aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-31 18:28:28 -0600
committerTom Tromey <tom@tromey.com>2021-03-31 18:28:30 -0600
commitaf82f89db0f4a9c161a642c201f4618e728b9ff9 (patch)
treed44037370d730a802769421a750371383fa634d9
parent24b6dd1ecf781b54da2a77709bd56dbcd10638cb (diff)
downloadgdb-af82f89db0f4a9c161a642c201f4618e728b9ff9.zip
gdb-af82f89db0f4a9c161a642c201f4618e728b9ff9.tar.gz
gdb-af82f89db0f4a9c161a642c201f4618e728b9ff9.tar.bz2
Remove two trivial functions from dwarf2/read.c
This removes dw2_map_matching_symbols and dw2_expand_symtabs_matching, merging them with their sole trivial callers. gdb/ChangeLog 2021-03-31 Tom Tromey <tom@tromey.com> * dwarf2/read.c (dwarf2_gdb_index::map_matching_symbols): Merge with dw2_map_matching_symbols. (dwarf2_gdb_index::expand_symtabs_matching): Merge with dw2_expand_symtabs_matching.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dwarf2/read.c45
2 files changed, 17 insertions, 35 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d4db1fd..36b2e0e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2021-03-31 Tom Tromey <tom@tromey.com>
+
+ * dwarf2/read.c (dwarf2_gdb_index::map_matching_symbols): Merge
+ with dw2_map_matching_symbols.
+ (dwarf2_gdb_index::expand_symtabs_matching): Merge with
+ dw2_expand_symtabs_matching.
+
2021-03-31 Tom Tromey <tromey@adacore.com>
* dwarf2/stringify.h: Fix typo.
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 2418301..a83c5f9 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -3837,8 +3837,8 @@ dw2_expand_symtabs_matching_one
gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify);
-static void
-dw2_map_matching_symbols
+void
+dwarf2_gdb_index::map_matching_symbols
(struct objfile *objfile,
const lookup_name_info &name, domain_enum domain,
int global,
@@ -3895,18 +3895,6 @@ dw2_map_matching_symbols
}
}
-void
-dwarf2_gdb_index::map_matching_symbols
- (struct objfile *objfile,
- const lookup_name_info &name, domain_enum domain,
- int global,
- gdb::function_view<symbol_found_callback_ftype> callback,
- symbol_compare_ftype *ordered_compare)
-{
- dw2_map_matching_symbols (objfile, name, domain, global, callback,
- ordered_compare);
-}
-
/* Starting from a search name, return the string that finds the upper
bound of all strings that start with SEARCH_NAME in a sorted name
list. Returns the empty string to indicate that the upper bound is
@@ -4858,14 +4846,14 @@ dw_expand_symtabs_matching_file_matcher
}
}
-static void
-dw2_expand_symtabs_matching
- (struct objfile *objfile,
- gdb::function_view<expand_symtabs_file_matcher_ftype> 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,
- enum search_domain kind)
+void
+dwarf2_gdb_index::expand_symtabs_matching
+ (struct objfile *objfile,
+ gdb::function_view<expand_symtabs_file_matcher_ftype> 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,
+ enum search_domain kind)
{
dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
@@ -4899,19 +4887,6 @@ dw2_expand_symtabs_matching
}, per_objfile);
}
-void
-dwarf2_gdb_index::expand_symtabs_matching
- (struct objfile *objfile,
- gdb::function_view<expand_symtabs_file_matcher_ftype> 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,
- enum search_domain kind)
-{
- dw2_expand_symtabs_matching (objfile, file_matcher, lookup_name,
- symbol_matcher, expansion_notify, kind);
-}
-
/* A helper for dw2_find_pc_sect_compunit_symtab which finds the most specific
symtab. */