From e11145903f25b7ac91dd12e6330df3faec0a3f1b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 20 Mar 2021 17:23:40 -0600 Subject: Switch objfile to hold a list of psymbol readers This changes objfile::qf to be a forward_list, and then updates all the uses to iterate over the list. Note that there is still only ever a single element in the list; this is handled by clearing the list whenever an object is added. gdb/ChangeLog 2021-03-20 Tom Tromey * dwarf2/read.c (dwarf2_build_psymtabs): Update. * symfile.c (syms_from_objfile_1, reread_symbols): Update. * symfile-debug.c (objfile::has_partial_symbols) (objfile::find_last_source_symtab) (objfile::forget_cached_source_info) (objfile::map_symtabs_matching_filename, objfile::lookup_symbol) (objfile::print_stats, objfile::dump) (objfile::expand_symtabs_for_function) (objfile::expand_all_symtabs) (objfile::expand_symtabs_with_fullname) (objfile::map_matching_symbols) (objfile::expand_symtabs_matching) (objfile::find_pc_sect_compunit_symtab) (objfile::map_symbol_filenames) (objfile::find_compunit_symtab_by_address) (objfile::lookup_global_symbol_language) (objfile::require_partial_symbols): Update. * psymtab.c (maintenance_print_psymbols) (maintenance_info_psymtabs, maintenance_check_psymtabs): Update. * objfiles.h (struct objfile) : Now a forward_list. * objfiles.c (objfile_relocate1): Update. * elfread.c (elf_symfile_read): Update. --- gdb/objfiles.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/objfiles.h') diff --git a/gdb/objfiles.h b/gdb/objfiles.h index cb441b1..2f56670 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -38,6 +38,7 @@ #include "gdbsupport/refcounted-object.h" #include "jit.h" #include "quick-symbol.h" +#include struct htab; struct objfile_data; @@ -668,7 +669,7 @@ public: /* The "quick" (aka partial) symbol functions for this symbol reader. */ - quick_symbol_functions_up qf; + std::forward_list qf; /* Per objfile data-pointers required by other GDB modules. */ -- cgit v1.1