diff options
author | Tom Tromey <tromey@adacore.com> | 2019-07-12 10:47:21 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-09-10 08:30:45 -0600 |
commit | 6969f124b987494df069b032e2e0f36485d3d8bb (patch) | |
tree | d0b2cbfb2b96651860e7336f4c6042c178676dc6 /gdb/ada-lang.c | |
parent | Change map_matching_symbols to take a symbol_found_callback_ftype (diff) | |
download | binutils-gdb-6969f124b987494df069b032e2e0f36485d3d8bb.tar.gz binutils-gdb-6969f124b987494df069b032e2e0f36485d3d8bb.tar.bz2 binutils-gdb-6969f124b987494df069b032e2e0f36485d3d8bb.zip |
Change iterate_over_symbols to return bool
This changes iterate_over_symbols to return a bool. This allows it to
be reused in another context in a subsequent patch.
gdb/ChangeLog
2019-09-10 Tom Tromey <tromey@adacore.com>
* ada-lang.c (ada_iterate_over_symbols): Return bool.
* language.h (struct language_defn) <la_iterate_over_symbols>:
Return bool.
* symtab.c (iterate_over_symbols): Return bool.
* symtab.h (iterate_over_symbols): Return bool.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index d677acdb60e..21d40c7aad4 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5740,7 +5740,7 @@ ada_lookup_symbol_list (const char *name, const struct block *block, /* Implementation of the la_iterate_over_symbols method. */ -static void +static bool ada_iterate_over_symbols (const struct block *block, const lookup_name_info &name, domain_enum domain, @@ -5754,8 +5754,10 @@ ada_iterate_over_symbols for (i = 0; i < ndefs; ++i) { if (!callback (&results[i])) - break; + return false; } + + return true; } /* The result is as for ada_lookup_symbol_list with FULL_SEARCH set |