forked from Imagelibrary/binutils-gdb
Remove sym_fns::sym_read_psymbols
Partial symbols are read via the sym_fns::sym_read_psymbols function pointer. In order to separate the partial symbols from the objfile, this must instead be done via a virtual method on quick_symbol_functions. This patch implements this change. gdb/ChangeLog 2021-03-20 Tom Tromey <tom@tromey.com> * xcoffread.c (xcoff_sym_fns): Update. * symfile.h (struct sym_fns) <sym_read_psymbols>: Remove. * symfile-debug.c (objfile::has_partial_symbols): Use can_lazily_read_symbols. (debug_sym_read_psymbols): Remove. (debug_sym_fns, install_symfile_debug_logging): Update. * quick-symbol.h (struct quick_symbol_functions) <can_lazily_read_symbols, read_partial_symbols>: New methods. * psymtab.c (require_partial_symbols): Use new 'qf' methods. * mipsread.c (ecoff_sym_fns): Update. * machoread.c (macho_sym_fns): Update. * elfread.c (struct lazy_dwarf_reader): New. (elf_symfile_read): Update. (read_psyms): Now a method of lazy_dwarf_reader. (elf_sym_fns): Update. (elf_sym_fns_lazy_psyms): Remove. * dbxread.c (aout_sym_fns): Update. * coffread.c (coff_sym_fns): Update.
This commit is contained in:
@@ -84,13 +84,12 @@ require_partial_symbols (struct objfile *objfile, bool verbose)
|
||||
{
|
||||
objfile->flags |= OBJF_PSYMTABS_READ;
|
||||
|
||||
if (objfile->sf != nullptr
|
||||
&& objfile->sf->sym_read_psymbols)
|
||||
if (objfile->qf->can_lazily_read_symbols ())
|
||||
{
|
||||
if (verbose)
|
||||
printf_filtered (_("Reading symbols from %s...\n"),
|
||||
objfile_name (objfile));
|
||||
(*objfile->sf->sym_read_psymbols) (objfile);
|
||||
objfile->qf->read_partial_symbols (objfile);
|
||||
|
||||
if (verbose && !objfile_has_symbols (objfile))
|
||||
printf_filtered (_("(No debugging symbols found in %s)\n"),
|
||||
|
||||
Reference in New Issue
Block a user