Remove quick_symbol_functions::map_symtabs_matching_filename

This replaces quick_symbol_functions::map_symtabs_matching_filename
with a call to expand_symtabs_matching.  As with the previous patch,
rather than update all callers, the implementation is consolidated in
objfile::map_symtabs_matching_filename.

gdb/ChangeLog
2021-04-17  Tom Tromey  <tom@tromey.com>

	* symfile-debug.c (objfile::map_symtabs_matching_filename):
	Rewrite.
	* quick-symbol.h (struct quick_symbol_functions)
	<map_symtabs_matching_filename>: Remove.
	* psymtab.c (partial_map_expand_apply)
	(psymbol_functions::map_symtabs_matching_filename): Remove.
	* psympriv.h (struct psymbol_functions)
	<map_symtabs_matching_filename>: Remove.
	* objfiles.h (struct objfile) <map_symtabs_matching_filename>:
	Update comment.
	* dwarf2/read.c (struct dwarf2_base_index_functions)
	<map_symtabs_matching_filename>: Remove.
	(dw2_map_expand_apply)
	(dwarf2_base_index_functions::map_symtabs_matching_filename):
	Remove.
This commit is contained in:
Tom Tromey
2021-04-17 09:35:04 -06:00
parent 84d865e39c
commit 536a40f3a8
7 changed files with 77 additions and 215 deletions

View File

@ -571,7 +571,18 @@ public:
/* See quick_symbol_functions. */
void forget_cached_source_info ();
/* See quick_symbol_functions. */
/* Expand and iterate over each "partial" symbol table in OBJFILE
where the source file is named NAME.
If NAME is not absolute, a match after a '/' in the symbol table's
file name will also work, REAL_PATH is NULL then. If NAME is
absolute then REAL_PATH is non-NULL absolute file name as resolved
via gdb_realpath from NAME.
If a match is found, the "partial" symbol table is expanded.
Then, this calls iterate_over_some_symtabs (or equivalent) over
all newly-created symbol tables, passing CALLBACK to it.
The result of this call is returned. */
bool map_symtabs_matching_filename
(const char *name, const char *real_path,
gdb::function_view<bool (symtab *)> callback);