diff options
author | Tom Tromey <tromey@adacore.com> | 2019-07-12 11:00:39 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-09-10 08:30:45 -0600 |
commit | 6a3dbf1bc620ae068c84074b2f72e11c24dc1e6d (patch) | |
tree | a1672a9db0aec737e60c18c9b80f363049504839 /gdb/symtab.h | |
parent | 6969f124b987494df069b032e2e0f36485d3d8bb (diff) | |
download | gdb-6a3dbf1bc620ae068c84074b2f72e11c24dc1e6d.zip gdb-6a3dbf1bc620ae068c84074b2f72e11c24dc1e6d.tar.gz gdb-6a3dbf1bc620ae068c84074b2f72e11c24dc1e6d.tar.bz2 |
Simplify psym_map_matching_symbols
This introduces a new helper function,
iterate_over_symbols_terminated, and changes psym_map_matching_symbols
to use it. A subsequent patch will introduce a new user of this
function in the DWARF reader.
gdb/ChangeLog
2019-09-10 Tom Tromey <tromey@adacore.com>
* psymtab.c (map_block): Remove.
(psym_map_matching_symbols): Use iterate_over_symbols_terminated.
* symtab.c (iterate_over_symbols_terminated): New function.
* symtab.c (iterate_over_symbols_terminated): Declare.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r-- | gdb/symtab.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h index 49feea6..4fb00cb 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -2106,6 +2106,16 @@ bool iterate_over_symbols (const struct block *block, const domain_enum domain, gdb::function_view<symbol_found_callback_ftype> callback); +/* Like iterate_over_symbols, but if all calls to CALLBACK return + true, then calls CALLBACK one additional time with a block_symbol + that has a valid block but a NULL symbol. */ + +bool iterate_over_symbols_terminated + (const struct block *block, + const lookup_name_info &name, + const domain_enum domain, + gdb::function_view<symbol_found_callback_ftype> callback); + /* Storage type used by demangle_for_lookup. demangle_for_lookup either returns a const char * pointer that points to either of the fields of this type, or a pointer to the input NAME. This is done |