]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change handling of DW_TAG_enumeration_type in DWARF scanner
authorTom Tromey <tom@tromey.com>
Sat, 13 Jan 2024 01:01:00 +0000 (18:01 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 16 Apr 2024 17:54:46 +0000 (11:54 -0600)
commit4e417d7bb1c7d8b8a73b73b0b7c051f0a6e1b6b6
tree52608a14ed22651b7f22f137de0631516642fb5d
parent08b91f595d7e2f181e3ac18838ff5a9421aa4d33
Change handling of DW_TAG_enumeration_type in DWARF scanner

Currently the DWARF scanner will enter enumeration constants into the
same namespace as the DW_TAG_enumeration_type itself.  This is the
right thing to do, but the implementation may result in strange
entries being added to the addrmap that maps DIE ranges to entries.

This came up when debugging an earlier version of this series; and
while I don't think this should impact the current series, it seems
better to clean this up anyway.

In the new code, rather than pass the "wrong" scope down through
recursive calls to the scanner, the correct scope is always passed,
and then the parent handling is done when creating the enumerator
entry.
gdb/dwarf2/read.c