diff options
author | Gary Benson <gary@redhat.com> | 2012-02-01 16:10:31 +0000 |
---|---|---|
committer | Gary Benson <gary@redhat.com> | 2012-02-01 16:10:31 +0000 |
commit | 8e704927af04cf5567a4f3bb715328e383505214 (patch) | |
tree | 0ae55b7b42756d442c69b06563d5592bc5090875 /gdb/linespec.c | |
parent | d9680e739f79d8f9061f0404efb2a8477a89c83b (diff) | |
download | gdb-8e704927af04cf5567a4f3bb715328e383505214.zip gdb-8e704927af04cf5567a4f3bb715328e383505214.tar.gz gdb-8e704927af04cf5567a4f3bb715328e383505214.tar.bz2 |
2012-02-01 Gary Benson <gbenson@redhat.com>
* symtab.h (symbol_name_match_p_ftype): New typedef.
(iterate_over_symbols): Use the above.
* symtab.c (iterate_over_symbols): Likewise.
* language.h (language_defn->la_iterate_over_symbols): Likewise.
* ada-lang.c (ada_iterate_over_symbols): Likewise.
* linespec.c (iterate_over_all_matching_symtabs): Likewise.
(iterate_name_matcher): Document return values.
(collect_one_symbol): Likewise.
(collect_function_symbols): Likewise.
(collect_symbols): Likewise.
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r-- | gdb/linespec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c index 50ebf6f..4e42750 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -341,8 +341,8 @@ iterate_name_matcher (const char *name, void *d) const struct symbol_matcher_data *data = d; if (data->symbol_name_match_p (name, data->lookup_name) == 0) - return 1; - return 0; + return 1; /* Expand this symbol's symbol table. */ + return 0; /* Skip this symbol. */ } /* A helper that walks over all matching symtabs in all objfiles and @@ -353,7 +353,7 @@ iterate_name_matcher (const char *name, void *d) static void iterate_over_all_matching_symtabs (const char *name, const domain_enum domain, - int (*callback) (struct symbol *, void *), + symbol_found_callback_ftype *callback, void *data, struct program_space *search_pspace) { @@ -1808,14 +1808,14 @@ collect_one_symbol (struct symbol *sym, void *d) struct type *t; if (SYMBOL_CLASS (sym) != LOC_TYPEDEF) - return 1; + return 1; /* Continue iterating. */ t = SYMBOL_TYPE (sym); CHECK_TYPEDEF (t); if (TYPE_CODE (t) != TYPE_CODE_STRUCT && TYPE_CODE (t) != TYPE_CODE_UNION && TYPE_CODE (t) != TYPE_CODE_NAMESPACE) - return 1; + return 1; /* Continue iterating. */ slot = htab_find_slot (collector->unique_syms, sym, INSERT); if (!*slot) @@ -1824,7 +1824,7 @@ collect_one_symbol (struct symbol *sym, void *d) VEC_safe_push (symbolp, collector->symbols, sym); } - return 1; + return 1; /* Continue iterating. */ } /* Return the symbol corresponding to the substring of *ARGPTR ending @@ -2215,7 +2215,7 @@ collect_function_symbols (struct symbol *sym, void *arg) if (SYMBOL_CLASS (sym) == LOC_BLOCK) VEC_safe_push (symbolp, *syms, sym); - return 1; + return 1; /* Continue iterating. */ } /* Look up a function symbol in *ARGPTR. If found, advance *ARGPTR @@ -2722,7 +2722,7 @@ collect_symbols (struct symbol *sym, void *data) add_sal_to_sals (info->state, &info->result, &sal, SYMBOL_NATURAL_NAME (sym)); - return 1; + return 1; /* Continue iterating. */ } /* We've found a minimal symbol MSYMBOL to associate with our |