diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-20 17:23:40 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-20 17:23:44 -0600 |
commit | eb00e4686dd1a1530737e2de7eae971d61332da1 (patch) | |
tree | 72c57133482f5dbc22fe2d204357ab13c194bc06 /gdb/symfile-debug.c | |
parent | b29b98cf8411ac136d17fc68236fc029447f1461 (diff) | |
download | gdb-eb00e4686dd1a1530737e2de7eae971d61332da1.zip gdb-eb00e4686dd1a1530737e2de7eae971d61332da1.tar.gz gdb-eb00e4686dd1a1530737e2de7eae971d61332da1.tar.bz2 |
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.
Diffstat (limited to 'gdb/symfile-debug.c')
-rw-r--r-- | gdb/symfile-debug.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index 406eac0..94559c7 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -81,8 +81,8 @@ objfile::has_partial_symbols () this function the symbols may have been already read in but they also may not be present in this objfile. */ if ((flags & OBJF_PSYMTABS_READ) == 0 - && sf != nullptr - && sf->sym_read_psymbols != NULL) + && qf != nullptr + && qf->can_lazily_read_symbols ()) retval = true; else if (qf != nullptr) retval = qf->has_symbols (this); @@ -421,18 +421,6 @@ debug_sym_read (struct objfile *objfile, symfile_add_flags symfile_flags) } static void -debug_sym_read_psymbols (struct objfile *objfile) -{ - const struct debug_sym_fns_data *debug_data - = symfile_debug_objfile_data_key.get (objfile); - - fprintf_filtered (gdb_stdlog, "sf->sym_read_psymbols (%s)\n", - objfile_debug_name (objfile)); - - debug_data->real_sf->sym_read_psymbols (objfile); -} - -static void debug_sym_finish (struct objfile *objfile) { const struct debug_sym_fns_data *debug_data @@ -508,7 +496,6 @@ static const struct sym_fns debug_sym_fns = debug_sym_new_init, debug_sym_init, debug_sym_read, - debug_sym_read_psymbols, debug_sym_finish, debug_sym_offsets, debug_sym_segments, @@ -543,8 +530,6 @@ install_symfile_debug_logging (struct objfile *objfile) COPY_SF_PTR (real_sf, debug_data, sym_new_init, debug_sym_new_init); COPY_SF_PTR (real_sf, debug_data, sym_init, debug_sym_init); COPY_SF_PTR (real_sf, debug_data, sym_read, debug_sym_read); - COPY_SF_PTR (real_sf, debug_data, sym_read_psymbols, - debug_sym_read_psymbols); COPY_SF_PTR (real_sf, debug_data, sym_finish, debug_sym_finish); COPY_SF_PTR (real_sf, debug_data, sym_offsets, debug_sym_offsets); COPY_SF_PTR (real_sf, debug_data, sym_segments, debug_sym_segments); |