From 8e704927af04cf5567a4f3bb715328e383505214 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Wed, 1 Feb 2012 16:10:31 +0000 Subject: 2012-02-01 Gary Benson * 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. --- gdb/symtab.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gdb/symtab.h') diff --git a/gdb/symtab.h b/gdb/symtab.h index 5541402aff6..d4cb337b79e 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1248,9 +1248,18 @@ DEF_VEC_I (CORE_ADDR); VEC (CORE_ADDR) *find_pcs_for_symtab_line (struct symtab *symtab, int line, struct linetable_entry **best_entry); +/* Callback for LA_ITERATE_OVER_SYMBOLS. The callback will be called + once per matching symbol SYM, with DATA being the argument of the + same name that was passed to LA_ITERATE_OVER_SYMBOLS. The callback + should return nonzero to indicate that LA_ITERATE_OVER_SYMBOLS + should continue iterating, or zero to indicate that the iteration + should end. */ + +typedef int (symbol_found_callback_ftype) (struct symbol *sym, void *data); + void iterate_over_symbols (const struct block *block, const char *name, const domain_enum domain, - int (*callback) (struct symbol *, void *), + symbol_found_callback_ftype *callback, void *data); struct cleanup *demangle_for_lookup (const char *name, enum language lang, -- cgit v1.2.1