Remove quick_symbol_functions::expand_symtabs_for_function

This removes quick_symbol_functions::expand_symtabs_for_function,
replacing it with a call to expand_symtabs_matching.  As with the
previous patches, the implementation is consolidated in the objfile
method.

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

	* symfile-debug.c (objfile::expand_symtabs_for_function):
	Rewrite.
	* quick-symbol.h (struct quick_symbol_functions)
	<expand_symtabs_for_function>: Remove.
	* psymtab.c (psymbol_functions::expand_symtabs_for_function):
	Remove.
	* psympriv.h (struct psymbol_functions)
	<expand_symtabs_for_function>: Remove.
	* objfiles.h (struct objfile) <expand_symtabs_for_function>:
	Update comment.
	* dwarf2/read.c (struct dwarf2_gdb_index)
	<expand_symtabs_for_function>: Remove.
	(struct dwarf2_debug_names_index) <expand_symtabs_for_function>:
	Remove.
	(find_slot_in_mapped_hash): Remove.
	(dw2_symtab_iter_init_common): Merge with dw2_symtab_iter_init.
	(dw2_symtab_iter_init): Remove one overload.
	(dwarf2_gdb_index::expand_symtabs_for_function)
	(dwarf2_debug_names_index::expand_symtabs_for_function): Remove.
This commit is contained in:
Tom Tromey 2021-04-17 09:35:04 -06:00
parent 536a40f3a8
commit 7089bd886e
7 changed files with 43 additions and 178 deletions

View file

@ -300,8 +300,19 @@ objfile::expand_symtabs_for_function (const char *func_name)
"qf->expand_symtabs_for_function (%s, \"%s\")\n",
objfile_debug_name (this), func_name);
lookup_name_info base_lookup (func_name, symbol_name_match_type::FULL);
lookup_name_info lookup_name = base_lookup.make_ignore_params ();
for (const auto &iter : qf)
iter->expand_symtabs_for_function (this, func_name);
iter->expand_symtabs_matching (this,
nullptr,
&lookup_name,
nullptr,
nullptr,
(SEARCH_GLOBAL_BLOCK
| SEARCH_STATIC_BLOCK),
VAR_DOMAIN,
ALL_DOMAIN);
}
void