aboutsummaryrefslogtreecommitdiff
path: root/gdb/quick-symbol.h
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/quick-symbol.h')
-rw-r--r--gdb/quick-symbol.h61
1 files changed, 31 insertions, 30 deletions
diff --git a/gdb/quick-symbol.h b/gdb/quick-symbol.h
index 9dbaf49..32090db 100644
--- a/gdb/quick-symbol.h
+++ b/gdb/quick-symbol.h
@@ -32,33 +32,36 @@ enum block_search_flag_values
DEF_ENUM_FLAGS_TYPE (enum block_search_flag_values, block_search_flags);
-/* Callback for quick_symbol_functions->map_symbol_filenames. */
+/* Callback for quick_symbol_functions::map_symbol_filenames. */
-typedef void (symbol_filename_ftype) (const char *filename,
- const char *fullname);
+using symbol_filename_listener
+ = gdb::function_view<void (const char *filename, const char *fullname)>;
-/* Callback for quick_symbol_functions->expand_symtabs_matching
+/* Callback for quick_symbol_functions::expand_symtabs_matching
to match a file name. */
-typedef bool (expand_symtabs_file_matcher_ftype) (const char *filename,
- bool basenames);
+using expand_symtabs_file_matcher
+ = gdb::function_view<bool (const char *filename, bool basenames)>;
-/* Callback for quick_symbol_functions->expand_symtabs_matching
+/* Callback for quick_symbol_functions::expand_symtabs_matching
to match a symbol name. */
-typedef bool (expand_symtabs_symbol_matcher_ftype) (const char *name);
+using expand_symtabs_symbol_matcher
+ = gdb::function_view<bool (const char *name)>;
-/* Callback for quick_symbol_functions->expand_symtabs_matching
+/* Callback for quick_symbol_functions::expand_symtabs_matching
to match a language. */
-typedef bool (expand_symtabs_lang_matcher_ftype) (enum language lang);
+using expand_symtabs_lang_matcher
+ = gdb::function_view<bool (enum language lang)>;
-/* Callback for quick_symbol_functions->expand_symtabs_matching
+/* Callback for quick_symbol_functions::expand_symtabs_matching
to be called after a symtab has been expanded. If this returns
true, more symtabs are checked; if it returns false, iteration
stops. */
-typedef bool (expand_symtabs_exp_notify_ftype) (compunit_symtab *symtab);
+using expand_symtabs_expansion_listener
+ = gdb::function_view<bool (compunit_symtab *symtab)>;
/* The "quick" symbol functions exist so that symbol readers can
avoiding an initial read of all the symbols. For example, symbol
@@ -153,21 +156,19 @@ struct quick_symbol_functions
Note that if SYMBOL_MATCHER is non-NULL, then LOOKUP_NAME must
also be provided.
- Otherwise, the symbol's symbol table is expanded and the
- notification function is called. If the notification function
- returns false, execution stops and this method returns false.
- Otherwise, more files are considered. This method will return
- true if all calls to the notification function return true. */
+ Otherwise, the symbol's symbol table is expanded and EXPANSION_NOTIFY is
+ called. If EXPANSION_NOTIFY returns false, execution stops and this method
+ returns false. Otherwise, more files are considered. This method returns
+ true if all calls to EXPANSION_NOTIFY return true. */
virtual bool expand_symtabs_matching
(struct objfile *objfile,
- gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+ expand_symtabs_file_matcher file_matcher,
const lookup_name_info *lookup_name,
- gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
- gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+ expand_symtabs_symbol_matcher symbol_matcher,
+ expand_symtabs_expansion_listener expansion_notify,
block_search_flags search_flags,
domain_search_flags domain,
- gdb::function_view<expand_symtabs_lang_matcher_ftype> lang_matcher
- = nullptr) = 0;
+ expand_symtabs_lang_matcher lang_matcher = nullptr) = 0;
/* Return the comp unit from OBJFILE that contains PC and
SECTION. Return NULL if there is no such compunit. This
@@ -187,14 +188,14 @@ struct quick_symbol_functions
virtual struct compunit_symtab *find_compunit_symtab_by_address
(struct objfile *objfile, CORE_ADDR address) = 0;
- /* Call a callback for every file defined in OBJFILE whose symtab is
- not already read in. FUN is the callback. It is passed the
- file's FILENAME and the file's FULLNAME (if need_fullname is
- non-zero). */
- virtual void map_symbol_filenames
- (struct objfile *objfile,
- gdb::function_view<symbol_filename_ftype> fun,
- bool need_fullname) = 0;
+ /* Call FUN for every file defined in OBJFILE whose symtab is
+ not already read in.
+
+ FUN is passed the file's FILENAME and the file's FULLNAME (if need_fullname
+ is true). */
+ virtual void map_symbol_filenames (objfile *objfile,
+ symbol_filename_listener fun,
+ bool need_fullname) = 0;
/* Compute the name and language of the main function for the given
objfile. Normally this is done during symbol reading, but this