Remove sym_fns::sym_read_psymbols
authorTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:40 +0000 (17:23 -0600)
committerTom Tromey <tom@tromey.com>
Sat, 20 Mar 2021 23:23:44 +0000 (17:23 -0600)
commiteb00e4686dd1a1530737e2de7eae971d61332da1
tree72c57133482f5dbc22fe2d204357ab13c194bc06
parentb29b98cf8411ac136d17fc68236fc029447f1461
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.
gdb/ChangeLog
gdb/coffread.c
gdb/dbxread.c
gdb/elfread.c
gdb/machoread.c
gdb/mipsread.c
gdb/psymtab.c
gdb/quick-symbol.h
gdb/symfile-debug.c
gdb/symfile.h
gdb/xcoffread.c