Change how DWARF indices use addrmap
authorTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:40 +0000 (17:23 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:43 +0000 (17:23 -0600)
commitefd7398ee26dc8f810243fc893590df4a8cd3238
tree3b53fa18b2523091ce81702474361e048f596ed9
parent51962708bd3701780ac9ffd99a70d8eb2149a376
Change how DWARF indices use addrmap

Currently the DWARF index readers reuse the objfile's partial symbol
table in order to store an addrmap.  We're going to be remove the
partial symbol object, so this patch changes the DWARF reader to store
this addrmap in the per_bfd object.  This object is chosen, rather
than the quick_symbol_functions subclass, because the addrmap can be
shared across objfiles.

gdb/ChangeLog
2021-03-20  Tom Tromey  <tom@tromey.com>

* dwarf2/read.h (struct dwarf2_per_bfd) <psymtabs_addrmap>: New
member.
* dwarf2/read.c (create_addrmap_from_index)
(create_addrmap_from_aranges): Set per_bfd addrmap.
(dwarf2_read_gdb_index): Don't set partial_symtabs.
(dwarf2_base_index_functions::find_pc_sect_compunit_symtab): Use
per_bfd addrmap.
(dwarf2_read_debug_names): Don't set partial_symtabs.
(dwarf2_initialize_objfile): Likewise.
gdb/ChangeLog
gdb/dwarf2/read.c
gdb/dwarf2/read.h