[PATCH v2 17/28] Remove expand_symtabs_matching

Tom Tromey
2025-04-03T00:02:08Z

The last caller of the global expand_symtabs_matching function has
been changed, so now we can remove this function.
---
gdb/symfile.c | 25 -------------------------
gdb/symfile.h | 9 ---------
2 files changed, 34 deletions(-)

diff --git a/gdb/symfile.c b/gdb/symfile.c
index b0c178a5aeb75c23862d6dd25a9e4bc6235ee231..8e229719b39f6cc4081448e5ec5fa82a0ead691f 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3756,31 +3756,6 @@ symfile_free_objfile (struct objfile *objfile)
objfile->pspace ()->remove_target_sections (objfile);
}

-/* Wrapper around the quick_symbol_functions expand_symtabs_matching "method".
- Expand all symtabs that match the specified criteria.
- See quick_symbol_functions.expand_symtabs_matching for details. */
-
-bool
-expand_symtabs_matching (expand_symtabs_file_matcher file_matcher,
- const lookup_name_info &lookup_name,
- expand_symtabs_symbol_matcher symbol_matcher,
- expand_symtabs_expansion_listener expansion_notify,
- block_search_flags search_flags,
- domain_search_flags domain,
- expand_symtabs_lang_matcher lang_matcher)
-{
- for (objfile *objfile : current_program_space->objfiles ())
- if (!objfile->expand_symtabs_matching (file_matcher,
- &lookup_name,
- symbol_matcher,
- expansion_notify,
- search_flags,
- domain,
- lang_matcher))
- return false;
- return true;
-}
-
/* Wrapper around the quick_symbol_functions map_symbol_filenames "method".
Map function FUN over every file.
See quick_symbol_functions.map_symbol_filenames for details. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
index c2e5142c045dab72fad9d73abd259813f9caef1e..e72030f5f0e1e5e0b094d288e4a81c58264222b8 100644
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -345,15 +345,6 @@ symfile_segment_data_up get_symfile_segment_data (bfd *abfd);

extern scoped_restore_tmpl<int> increment_reading_symtab (void);

-bool expand_symtabs_matching
- (expand_symtabs_file_matcher file_matcher,
- const lookup_name_info &lookup_name,
- expand_symtabs_symbol_matcher symbol_matcher,
- expand_symtabs_expansion_listener expansion_notify,
- block_search_flags search_flags,
- domain_search_flags kind,
- expand_symtabs_lang_matcher lang_matcher = nullptr);
-
void map_symbol_filenames (symbol_filename_listener fun, bool need_fullname);

/* Target-agnostic function to load the sections of an executable into memory.

--
2.46.1