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.