From 443e2a0c34b79fbedbbd2a3e9e0b77e6018cd850 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mar 04 2021 19:36:01 +0000 Subject: Reapply 10.1-8 after it has been accidentally reverted by 10.1-9. --- diff --git a/gdb-vla-intel-fortran-vla-strings.patch b/gdb-vla-intel-fortran-vla-strings.patch index 1e48ee8..0682b02 100644 --- a/gdb-vla-intel-fortran-vla-strings.patch +++ b/gdb-vla-intel-fortran-vla-strings.patch @@ -45,18 +45,14 @@ diff --git a/gdb/NEWS b/gdb/NEWS diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c -@@ -572,6 +572,28 @@ c_value_print (struct value *val, struct ui_file *stream, +@@ -572,6 +572,24 @@ c_value_print (struct value *val, struct ui_file *stream, else { /* normal case */ + if (type->code () == TYPE_CODE_PTR + && 1 == is_dynamic_type (type)) + { -+ CORE_ADDR addr; -+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (type))) -+ addr = value_address (val); -+ else -+ addr = value_as_address (val); ++ CORE_ADDR addr = value_as_address (val); + + /* We resolve the target-type only when the + pointer is associated. */ @@ -1009,7 +1005,7 @@ diff --git a/gdb/testsuite/gdb.fortran/vla-value.exp b/gdb/testsuite/gdb.fortran diff --git a/gdb/typeprint.c b/gdb/typeprint.c --- a/gdb/typeprint.c +++ b/gdb/typeprint.c -@@ -565,6 +565,25 @@ whatis_exp (const char *exp, int show) +@@ -565,6 +565,21 @@ whatis_exp (const char *exp, int show) printf_filtered (" */\n"); } @@ -1020,11 +1016,7 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c + if (type->code () == TYPE_CODE_PTR + && is_dynamic_type (type) == 1) + { -+ CORE_ADDR addr; -+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE(type))) -+ addr = value_address (val); -+ else -+ addr = value_as_address (val); ++ CORE_ADDR addr = value_as_address (val); + + if (addr != 0 + && type_not_associated (type) == 0) @@ -1038,19 +1030,15 @@ diff --git a/gdb/typeprint.c b/gdb/typeprint.c diff --git a/gdb/valops.c b/gdb/valops.c --- a/gdb/valops.c +++ b/gdb/valops.c -@@ -1553,6 +1553,19 @@ value_ind (struct value *arg1) +@@ -1553,6 +1553,15 @@ value_ind (struct value *arg1) if (base_type->code () == TYPE_CODE_PTR) { struct type *enc_type; -+ CORE_ADDR addr; + + if (type_not_associated (base_type)) + error (_("Attempt to take contents of a not associated pointer.")); + -+ if (NULL != TYPE_DATA_LOCATION (TYPE_TARGET_TYPE (base_type))) -+ addr = value_address (arg1); -+ else -+ addr = value_as_address (arg1); ++ CORE_ADDR addr = value_as_address (arg1); + + if (addr != 0) + TYPE_TARGET_TYPE (base_type) = diff --git a/gdb.spec b/gdb.spec index 5ba6149..9cfd33b 100644 --- a/gdb.spec +++ b/gdb.spec @@ -37,7 +37,7 @@ Version: 10.1 # The release always contains a leading reserved number, start it at 1. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. -Release: 9%{?dist} +Release: 10%{?dist} License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL # Do not provide URL for snapshots as the file lasts there only for 2 days. @@ -1195,6 +1195,9 @@ fi %endif %changelog +* Thu Mar 4 2021 Jan Kratochvil - 10.1-10 +- Reapply 10.1-8 after it has been accidentally reverted by 10.1-9. + * Wed Feb 24 2021 Kevin Buettner - 10.1-9 - Fix aarch64 build problem (RHBZ 1932645, Kevin Buettner).