diff options
author | Tom Tromey <tromey@adacore.com> | 2019-07-12 10:45:34 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-09-10 08:30:45 -0600 |
commit | 199b4314efbd419d6957e366e13a14cd87cea5e4 (patch) | |
tree | f1844b4639994e943190a9e15a9940c8bd7318e4 /gdb/symfile.h | |
parent | aebcfb76fc165795e67917cb67cf985c4dfdc577 (diff) | |
download | gdb-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.h')
-rw-r--r-- | gdb/symfile.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gdb/symfile.h b/gdb/symfile.h index 5e4d2f5..cf94888 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -212,7 +212,7 @@ struct quick_symbol_functions and for which MATCH (symbol name, NAME) == 0, passing each to CALLBACK, reading in partial symbol tables as needed. Look through global symbols if GLOBAL and otherwise static symbols. - Passes NAME, NAMESPACE, and DATA to CALLBACK with each symbol + Passes NAME and NAMESPACE to CALLBACK with each symbol found. After each block is processed, passes NULL to CALLBACK. MATCH must be weaker than strcmp_iw_ordered in the sense that strcmp_iw_ordered(x,y) == 0 --> MATCH(x,y) == 0. ORDERED_COMPARE, @@ -222,17 +222,16 @@ struct quick_symbol_functions and strcmp_iw_ordered(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0 (allowing strcmp_iw_ordered(x,y) < 0 while ORDERED_COMPARE(x, y) == 0). - CALLBACK returns 0 to indicate that the scan should continue, or - non-zero to indicate that the scan should be terminated. */ - - void (*map_matching_symbols) (struct 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); + CALLBACK returns true to indicate that the scan should continue, or + false to indicate that the scan should be terminated. */ + + void (*map_matching_symbols) + (struct 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); /* Expand all symbol tables in OBJFILE matching some criteria. |