From efd7398ee26dc8f810243fc893590df4a8cd3238 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 20 Mar 2021 17:23:40 -0600 Subject: 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 * dwarf2/read.h (struct dwarf2_per_bfd) : 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/dwarf2/read.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gdb/dwarf2/read.h') diff --git a/gdb/dwarf2/read.h b/gdb/dwarf2/read.h index 8932341..6cfbee9 100644 --- a/gdb/dwarf2/read.h +++ b/gdb/dwarf2/read.h @@ -257,6 +257,9 @@ public: partial symbols have been read the first time. */ std::shared_ptr partial_symtabs; + /* The address map that is used by the DWARF index code. */ + struct addrmap *index_addrmap = nullptr; + private: /* The total number of per_cu and signatured_type objects that have -- cgit v1.1