aboutsummaryrefslogtreecommitdiff
path: root/gdb/symfile.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2014-01-14 18:36:33 -0800
committerDoug Evans <dje@google.com>2014-01-14 18:36:33 -0800
commitbb4142cf49651ddcb0e00f6aaf451272c4c9977d (patch)
tree4582bd5006b3e7e0988522d52e07c8a0174fc2f7 /gdb/symfile.c
parent206f2a5777679e6d1ad21ce435f6e7af92e2d41a (diff)
downloadgdb-bb4142cf49651ddcb0e00f6aaf451272c4c9977d.zip
gdb-bb4142cf49651ddcb0e00f6aaf451272c4c9977d.tar.gz
gdb-bb4142cf49651ddcb0e00f6aaf451272c4c9977d.tar.bz2
psymtab cleanup patch 3/3
This last patch removes "partial" from the names of expand_partial_symbol_names and map_partial_symbol_filenames. It also renames expand_partial_symbol_names to match the struct quick_symbol_functions "method" that it wraps: expand_symtabs_matching. This patch also adds two parameters to expand_symtabs_matching so that it can fully wrap the underlying quick_symbol_functions method. This makes it usable in more places. I thought of having a cover function that still had the same signature as the old expand_partial_symbol_names function, but I couldn't think of a good name, and it wasn't clear it was worth it anyway. * symfile.h (expand_symtabs_matching): Renamed from expand_partial_symbol_names. Update prototype. (map_symbol_filenames): Renamed from map_partial_symbol_filenames. * symfile.c (expand_symtabs_matching): Renamed from expand_partial_symbol_names. New args file_matcher, kind. Rename arg fun to symbol_matcher. (map_symbol_filenames): Renamed from map_partial_symbol_filenames. * ada-lang.c (ada_complete_symbol_matcher): Renamed from ada_expand_partial_symbol_name. (ada_make_symbol_completion_list): Update to call expand_symtabs_matching. (ada_add_global_exceptions): Call expand_symtabs_matching. * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_files): Update to call map_symbol_filenames. * symtab.c (sources_info): Update to call map_symbol_filenames. (search_symbols): Call expand_symtabs_matching. (symbol_completion_matcher): Renamed from expand_partial_symbol_name. (default_make_symbol_completion_list_break_on): Update to call expand_symtabs_matching. (make_source_files_completion_list): Update to call map_symbol_filenames.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r--gdb/symfile.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 89ed34c..d863282 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3843,16 +3843,19 @@ symfile_free_objfile (struct objfile *objfile)
See quick_symbol_functions.expand_symtabs_matching for details. */
void
-expand_partial_symbol_names (expand_symtabs_symbol_matcher_ftype *fun,
- void *data)
+expand_symtabs_matching (expand_symtabs_file_matcher_ftype *file_matcher,
+ expand_symtabs_symbol_matcher_ftype *symbol_matcher,
+ enum search_domain kind,
+ void *data)
{
struct objfile *objfile;
ALL_OBJFILES (objfile)
{
if (objfile->sf)
- objfile->sf->qf->expand_symtabs_matching (objfile, NULL, fun,
- ALL_DOMAIN, data);
+ objfile->sf->qf->expand_symtabs_matching (objfile, file_matcher,
+ symbol_matcher, kind,
+ data);
}
}
@@ -3861,8 +3864,8 @@ expand_partial_symbol_names (expand_symtabs_symbol_matcher_ftype *fun,
See quick_symbol_functions.map_symbol_filenames for details. */
void
-map_partial_symbol_filenames (symbol_filename_ftype *fun, void *data,
- int need_fullname)
+map_symbol_filenames (symbol_filename_ftype *fun, void *data,
+ int need_fullname)
{
struct objfile *objfile;