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:41 -0600 |
commit | 4d080b4687deb2441a81762f3b01fc51cd13bd97 (patch) | |
tree | 09d767267d4430e86c9cc5637fcc328d05c7ceab /gdb/symfile.c | |
parent | fae2120ba0a6fd9288af24b359bf0e3ab3556cdb (diff) | |
download | gdb-4d080b4687deb2441a81762f3b01fc51cd13bd97.zip gdb-4d080b4687deb2441a81762f3b01fc51cd13bd97.tar.gz gdb-4d080b4687deb2441a81762f3b01fc51cd13bd97.tar.bz2 |
Introduce method wrappers for quick_symbol_functions
This introduces wrappers for each function in quick_symbol_functions.
The wrappers are methods on objfile, and are defined in
symfile-debug.c, so that they can use the symfile_debug variable.
Places that call the quick functions are all updated to call these new
wrapper methods.
gdb/ChangeLog
2021-03-20 Tom Tromey <tom@tromey.com>
* symtab.c (iterate_over_symtabs, expand_symtab_containing_pc)
(lookup_symbol_via_quick_fns, find_quick_global_symbol_language)
(basic_lookup_transparent_type_quick)
(find_pc_sect_compunit_symtab, find_symbol_at_address)
(find_line_symtab, global_symbol_searcher::expand_symtabs):
Update.
* symmisc.c (print_objfile_statistics, dump_objfile)
(maintenance_expand_symtabs): Update.
* symfile.c (symbol_file_add_with_addrs)
(expand_symtabs_matching, map_symbol_filenames): 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): New methods.
(debug_sym_quick_functions): Remove.
(debug_sym_fns, install_symfile_debug_logging): Update.
* source.c (forget_cached_source_info_for_objfile)
(select_source_symtab): Update.
* objfiles.h (struct objfile): Add methods corresponding to
quick_symbol_functions.
* objfiles.c (objfile::has_partial_symbols): Move to
symfile-debug.c.
* linespec.c (iterate_over_all_matching_symtabs): Update.
* cp-support.c (add_symbol_overload_list_qualified): Update.
* ada-lang.c (add_nonlocal_symbols): Update.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 34d6363..ac9adc8 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1100,8 +1100,7 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, printf_filtered (_("Expanding full symbols from %ps...\n"), styled_string (file_name_style.style (), name)); - if (objfile->sf) - objfile->sf->qf->expand_all_symtabs (objfile); + objfile->expand_all_symtabs (); } /* Note that we only print a message if we have no symbols and have @@ -3731,13 +3730,10 @@ expand_symtabs_matching enum search_domain kind) { for (objfile *objfile : current_program_space->objfiles ()) - { - if (objfile->sf) - objfile->sf->qf->expand_symtabs_matching (objfile, file_matcher, - &lookup_name, - symbol_matcher, - expansion_notify, kind); - } + objfile->expand_symtabs_matching (file_matcher, + &lookup_name, + symbol_matcher, + expansion_notify, kind); } /* Wrapper around the quick_symbol_functions map_symbol_filenames "method". @@ -3749,11 +3745,7 @@ map_symbol_filenames (symbol_filename_ftype *fun, void *data, int need_fullname) { for (objfile *objfile : current_program_space->objfiles ()) - { - if (objfile->sf) - objfile->sf->qf->map_symbol_filenames (objfile, fun, data, - need_fullname); - } + objfile->map_symbol_filenames (fun, data, need_fullname); } #if GDB_SELF_TEST |