This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/20536] fails to handle DW_AT_upper_bound with DW_AT_constant_value in referenced DIE
- From: "mjw at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 13 Sep 2016 13:12:37 +0000
- Subject: [Bug gdb/20536] fails to handle DW_AT_upper_bound with DW_AT_constant_value in referenced DIE
- Auto-submitted: auto-generated
- References: <bug-20536-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20536
--- Comment #1 from Mark Wielaard <mjw at redhat dot com> ---
I believe this is correct DWARF, DW_AT_upper_bound may be a reference to
another DIE that describes the value as either a constant, variable or location
expression. GDB doesn't seem to handle the reference to a constant case.
Looking at gdb/dwarf2read.c (read_subrange_type) I see DW_AT_upper_bound is
handled by calling attr_to_dynamic_prop () which handles constants, blocks and
references. But if attr_to_dynamic_prop sees a reference, it will only check
that the referenced DIE has a DW_AT_location or DW_AT_data_member_location, but
not DW_AT_const_value.
Random note (since I am actually an elfutils hacker): libdw
dwarf_aggregate_size only handles constants and not references (nor
expressions) for DW_AT_upper_bound.
--
You are receiving this mail because:
You are on the CC list for the bug.