This is the mail archive of the gdb-prs@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]

[Bug gdb/20536] fails to handle DW_AT_upper_bound with DW_AT_constant_value in referenced DIE


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.

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