diff options
Diffstat (limited to 'gdb/language.h')
-rw-r--r-- | gdb/language.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/gdb/language.h b/gdb/language.h index b808c9e..3d21e4e 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -24,6 +24,7 @@ #define LANGUAGE_H 1 #include "symtab.h" +#include "common/function-view.h" /* Forward decls for prototypes. */ struct value; @@ -372,18 +373,15 @@ struct language_defn The caller is responsible for iterating up through superblocks if desired. - For each one, call CALLBACK with the symbol and the DATA - argument. If CALLBACK returns zero, the iteration ends at that - point. + For each one, call CALLBACK with the symbol. If CALLBACK + returns false, the iteration ends at that point. This field may not be NULL. If the language does not need any special processing here, 'iterate_over_symbols' should be used as the definition. */ - void (*la_iterate_over_symbols) (const struct block *block, - const char *name, - domain_enum domain, - symbol_found_callback_ftype *callback, - void *data); + void (*la_iterate_over_symbols) + (const struct block *block, const char *name, domain_enum domain, + gdb::function_view<symbol_found_callback_ftype> callback); /* Various operations on varobj. */ const struct lang_varobj_ops *la_varobj_ops; @@ -527,9 +525,8 @@ extern enum language set_language (enum language); #define LA_PRINT_ARRAY_INDEX(index_value, stream, options) \ (current_language->la_print_array_index(index_value, stream, options)) -#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK, DATA) \ - (current_language->la_iterate_over_symbols (BLOCK, NAME, DOMAIN, CALLBACK, \ - DATA)) +#define LA_ITERATE_OVER_SYMBOLS(BLOCK, NAME, DOMAIN, CALLBACK) \ + (current_language->la_iterate_over_symbols (BLOCK, NAME, DOMAIN, CALLBACK)) /* Test a character to decide whether it can be printed in literal form or needs to be printed in another representation. For example, |