Fix method naming bug in new DWARF indexer
authorTom Tromey <tromey@adacore.com>
Thu, 21 Apr 2022 15:37:24 +0000 (09:37 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 22 Apr 2022 12:40:49 +0000 (06:40 -0600)
commit6acc36f71dfc60e357496174672103f133f85e97
tree60950c261198aaefca12869e7baf0a643a15c047
parent77e99ad92f1a5855a2a3c1a8b9f484b6beb5bdd3
Fix method naming bug in new DWARF indexer

Pedro pointed out that gdb-add-index is much slower with the new DWARF
indexer.  He also noticed that, in some cases, the generated
.gdb_index would have the wrong fully-qualified name for a method.

I tracked this down to a bug in the indexer.  If a type could have
methods but was marked as a declaration, the indexer was ignoring it.
However, this meant that the internal map to find the qualified name
was not updated for this container.
gdb/dwarf2/abbrev.c
gdb/dwarf2/read.c
gdb/testsuite/gdb.dwarf2/struct-decl.exp [new file with mode: 0644]