aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile-debug.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-12 10:45:34 -0600
committerTom Tromey <tromey@adacore.com>2019-09-10 08:30:45 -0600
commit199b4314efbd419d6957e366e13a14cd87cea5e4 (patch)
treef1844b4639994e943190a9e15a9940c8bd7318e4 /gdb/symfile-debug.c
parentaebcfb76fc165795e67917cb67cf985c4dfdc577 (diff)
downloadgdb-199b4314efbd419d6957e366e13a14cd87cea5e4.zip
gdb-199b4314efbd419d6957e366e13a14cd87cea5e4.tar.gz
gdb-199b4314efbd419d6957e366e13a14cd87cea5e4.tar.bz2
Change map_matching_symbols to take a symbol_found_callback_ftype
This changes map_matching_symbols to take a symbol_found_callback_ftype, rather than separate callback and data parameters. This enables a future patch to clean up some existing code so that it can more readily be shared. gdb/ChangeLog 2019-09-10 Tom Tromey <tromey@adacore.com> * ada-lang.c (aux_add_nonlocal_symbols): Change type. (add_nonlocal_symbols): Update. * dwarf2read.c (dw2_map_matching_symbols): Change type. * psymtab.c (map_block, psym_map_matching_symbols): Change type. * symfile-debug.c (debug_qf_map_matching_symbols): Change type. * symfile.h (struct quick_symbol_functions) <map_matching_symbols>: Change type of "callback". Remove "data".
Diffstat (limited to 'gdb/symfile-debug.c')
-rw-r--r--gdb/symfile-debug.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index c5b565f..d36c192 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -228,30 +228,27 @@ 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,
- int global,
- int (*callback) (const struct block *,
- struct symbol *, void *),
- void *data,
- symbol_name_match_type match,
- symbol_compare_ftype *ordered_compare)
+debug_qf_map_matching_symbols
+ (struct objfile *objfile,
+ const char *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, %s, %s)\n",
+ "qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s)\n",
objfile_debug_name (objfile), name,
domain_name (domain), global,
- host_address_to_string (callback),
- host_address_to_string (data),
plongest ((LONGEST) match),
host_address_to_string (ordered_compare));
debug_data->real_sf->qf->map_matching_symbols (objfile, name,
domain, global,
- callback, data,
+ callback,
match,
ordered_compare);
}