aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-20 17:23:40 -0600
committerTom Tromey <tom@tromey.com>2021-03-20 17:23:46 -0600
commiteb36a3eb2f846b8d4b16c1bb114136961d0ce5bf (patch)
tree66db807b35c33f6ba4ab2406e19308ecd2ac4a29 /gdb/symfile.c
parente11145903f25b7ac91dd12e6330df3faec0a3f1b (diff)
downloadgdb-eb36a3eb2f846b8d4b16c1bb114136961d0ce5bf.zip
gdb-eb36a3eb2f846b8d4b16c1bb114136961d0ce5bf.tar.gz
gdb-eb36a3eb2f846b8d4b16c1bb114136961d0ce5bf.tar.bz2
Allow multiple partial symbol readers per objfile
This patch finally changes gdb so that an objfile can have multiple sources of partial symbols (or mixed partial symbols and other kinds of indices). This is done by having each symbol reader create its own psymbol_functions object and add it to the 'qf' list in the objfile. gdb/ChangeLog 2021-03-20 Tom Tromey <tom@tromey.com> * xcoffread.c (xcoff_initial_scan): Create partial symtabs. * symfile.c (syms_from_objfile_1, reread_symbols): Update. * psymtab.h (make_psymbol_functions): Don't declare. * psymtab.c (make_psymbol_functions): Remove. (maintenance_print_psymbols): Update. * psympriv.h (struct psymbol_functions): Add no-argument constructor. * objfiles.h (struct objfile) <reset_psymtabs>: Remove. <partial_symtabs>: Remove. * mdebugread.c (mdebug_build_psymtabs): Create partial symtabs. * elfread.c (read_partial_symbols): Update. (elf_symfile_read): Remove check for existing partial symbols. Don't clear "qf". * dwarf2/read.c (dwarf2_has_info): Remove check for existing partial symbols. (dwarf2_build_psymtabs): Add psymbol_functions parameter. Create partial symtabs. * dwarf2/public.h (dwarf2_build_psymtabs): Add psymbol_functions parameter. * dbxread.c (dbx_symfile_read): Create partial symtabs. * ctfread.c (elfctf_build_psymtabs): Create partial symtabs.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 244565f..adcdc16 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -902,9 +902,7 @@ syms_from_objfile_1 (struct objfile *objfile,
const int mainline = add_flags & SYMFILE_MAINLINE;
objfile_set_sym_fns (objfile, find_sym_fns (objfile->obfd));
- objfile->reset_psymtabs ();
objfile->qf.clear ();
- objfile->qf.push_front (make_psymbol_functions (objfile->partial_symtabs));
if (objfile->sf == NULL)
{
@@ -2553,10 +2551,7 @@ reread_symbols (void)
based on whether .gdb_index is present, and we need it to
start over. PR symtab/15885 */
objfile_set_sym_fns (objfile, find_sym_fns (objfile->obfd));
- objfile->reset_psymtabs ();
objfile->qf.clear ();
- objfile->qf.push_front
- (make_psymbol_functions (objfile->partial_symtabs));
build_objfile_section_table (objfile);