/* Source-language-related definitions for GDB.
- Copyright (C) 1991-2016 Free Software Foundation, Inc.
+ Copyright (C) 1991-2017 Free Software Foundation, Inc.
Contributed by the Department of Computer Science at the State University
of New York at Buffalo.
#define LANGUAGE_H 1
#include "symtab.h"
+#include "common/function-view.h"
/* Forward decls for prototypes. */
struct value;
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;
#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,