aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2/cooked-index.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2025-02-25 16:28:38 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2025-02-25 22:22:52 -0500
commit00aa53dabce66ca713a1b3ae214d8fd00eabdc9e (patch)
tree75c2603662f388f5ef6b28913f6d1de666724404 /gdb/dwarf2/cooked-index.h
parentf563d6cc749f0577bfe3e01426d1eed670870d4c (diff)
downloadbinutils-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/dwarf2/cooked-index.h')
-rw-r--r--gdb/dwarf2/cooked-index.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h
index 925f73b..d642c13 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -782,14 +782,13 @@ struct cooked_index_functions : public dwarf2_base_index_functions
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)
- override;
+ expand_symtabs_lang_matcher lang_matcher) override;
struct compunit_symtab *find_pc_sect_compunit_symtab
(struct objfile *objfile, bound_minimal_symbol msymbol,
@@ -800,10 +799,8 @@ struct cooked_index_functions : public dwarf2_base_index_functions
(objfile, msymbol, pc, section, warn_if_readin));
}
- void map_symbol_filenames
- (struct objfile *objfile,
- gdb::function_view<symbol_filename_ftype> fun,
- bool need_fullname) override
+ void map_symbol_filenames (objfile *objfile, symbol_filename_listener fun,
+ bool need_fullname) override
{
wait (objfile, true);
return (dwarf2_base_index_functions::map_symbol_filenames