This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch+8.0] DWARF-5 Fix DW_FORM_implicit_const


Hi,

the other possibility is to patch attr_form_is_constant() and
dwarf2_get_attr_constant_value(), I do not see what is better.

It fixes for example:
	FAIL: gdb.base/constvars.exp: ptype logical

for -gdwarf-4 vs. -gdwarf-5.


Jan
gdb/ChangeLog
2017-06-22  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* dwarf2read.c (read_attribute_value) <DW_FORM_implicit_const>: Set it
	as DW_FORM_sdata.

diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 2369d4b..77f870d 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -16775,6 +16775,7 @@ read_attribute_value (const struct die_reader_specs *reader,
 				       info_ptr);
       break;
     case DW_FORM_implicit_const:
+      attr->form = DW_FORM_sdata;
       DW_SND (attr) = implicit_const;
       break;
     case DW_FORM_GNU_addr_index:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]