From 199b4314efbd419d6957e366e13a14cd87cea5e4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 12 Jul 2019 10:45:34 -0600 Subject: 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 * 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) : Change type of "callback". Remove "data". --- gdb/dwarf2read.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'gdb/dwarf2read.c') diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a759418..cccc493 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4184,13 +4184,13 @@ dw2_expand_symtabs_with_fullname (struct objfile *objfile, } static void -dw2_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) +dw2_map_matching_symbols + (struct objfile *objfile, + const char * name, domain_enum domain, + int global, + gdb::function_view callback, + symbol_name_match_type match, + symbol_compare_ftype *ordered_compare) { /* Currently unimplemented; used for Ada. The function can be called if the current language is Ada for a non-Ada objfile using GNU index. As Ada -- cgit v1.1