Change map_matching_symbols to take a lookup_name_info

This patch further simplifies the map_matching_symbols callback, by
having it take a lookup_name_info rather than a plain string.

gdb/ChangeLog
2019-09-10  Tom Tromey  <tromey@adacore.com>

	* ada-lang.c (add_nonlocal_symbols): Combine calls to
	map_matching_symbols.  Update.
	* dwarf2read.c (dw2_map_matching_symbols): Update.
	* psymtab.c (match_partial_symbol): Change type; update.
	(psym_map_matching_symbols): Likewise.
	* symfile-debug.c (debug_qf_map_matching_symbols): Change
	type; update.
	* symfile.h (struct quick_symbol_functions)
	<map_matching_symbols>: Change "name" to be a lookup_name_info.
	Remove "match".
This commit is contained in:
Tom Tromey 2019-07-12 13:34:52 -06:00
parent 6a3dbf1bc6
commit b054970d54
6 changed files with 33 additions and 43 deletions

View file

@ -230,26 +230,23 @@ debug_qf_expand_symtabs_with_fullname (struct objfile *objfile,
static void
debug_qf_map_matching_symbols
(struct objfile *objfile,
const char *name, domain_enum domain,
const lookup_name_info &name, domain_enum domain,
int global,
gdb::function_view<symbol_found_callback_ftype> callback,
symbol_name_match_type match,
symbol_compare_ftype *ordered_compare)
{
const struct debug_sym_fns_data *debug_data
= symfile_debug_objfile_data_key.get (objfile);
fprintf_filtered (gdb_stdlog,
"qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s)\n",
objfile_debug_name (objfile), name,
"qf->map_matching_symbols (%s, %s, %d, %s)\n",
objfile_debug_name (objfile),
domain_name (domain), global,
plongest ((LONGEST) match),
host_address_to_string (ordered_compare));
debug_data->real_sf->qf->map_matching_symbols (objfile, name,
domain, global,
callback,
match,
ordered_compare);
}