diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2025-02-25 16:28:38 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2025-02-25 22:22:52 -0500 |
commit | 00aa53dabce66ca713a1b3ae214d8fd00eabdc9e (patch) | |
tree | 75c2603662f388f5ef6b28913f6d1de666724404 /gdb/objfiles.h | |
parent | f563d6cc749f0577bfe3e01426d1eed670870d4c (diff) | |
download | binutils-00aa53dabce66ca713a1b3ae214d8fd00eabdc9e.zip binutils-00aa53dabce66ca713a1b3ae214d8fd00eabdc9e.tar.gz binutils-00aa53dabce66ca713a1b3ae214d8fd00eabdc9e.tar.bz2 |
gdb: move "gdb:function_view" into quick-symbol.h typedefs
All users of these typedefs use them inside a gdb::function_view. Move
the gdb::function_view in the typedefs themselves. This shortens the
types in function signatures and helps with readability, IMO.
Rename them to remove the `_ftype` suffix: this suffix is not as
relevant in C++ as it was in C. With function_view, the caller can pass
more than just a simple "function". Anyway, I think it's clearer to
name them after the role the callback has (listener, matcher, etc).
Adjust some related comments.
Change-Id: Iaf9f8ede68b51ea9e4d954792e8eb90def8659a6
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 4ac56d7..05e1e01 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -593,14 +593,13 @@ public: /* See quick_symbol_functions. */ bool expand_symtabs_matching - (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); + expand_symtabs_lang_matcher lang_matcher = nullptr); /* See quick_symbol_functions. */ struct compunit_symtab * @@ -609,8 +608,7 @@ public: int warn_if_readin); /* See quick_symbol_functions. */ - void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun, - bool need_fullname); + void map_symbol_filenames (symbol_filename_listener fun, bool need_fullname); /* See quick_symbol_functions. */ void compute_main_name (); |