diff options
author | Doug Evans <dje@google.com> | 2014-01-14 18:36:33 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-01-14 18:36:33 -0800 |
commit | bb4142cf49651ddcb0e00f6aaf451272c4c9977d (patch) | |
tree | 4582bd5006b3e7e0988522d52e07c8a0174fc2f7 /gdb/ada-lang.c | |
parent | 206f2a5777679e6d1ad21ce435f6e7af92e2d41a (diff) | |
download | gdb-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/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b3224f3..a1b638c 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -5866,7 +5866,7 @@ symbol_completion_add (VEC(char_ptr) **sv, } /* An object of this type is passed as the user_data argument to the - expand_partial_symbol_names method. */ + expand_symtabs_matching method. */ struct add_partial_datum { VEC(char_ptr) **completions; @@ -5878,9 +5878,10 @@ struct add_partial_datum int encoded; }; -/* A callback for expand_partial_symbol_names. */ +/* A callback for expand_symtabs_matching. */ + static int -ada_expand_partial_symbol_name (const char *name, void *user_data) +ada_complete_symbol_matcher (const char *name, void *user_data) { struct add_partial_datum *data = user_data; @@ -5946,7 +5947,8 @@ ada_make_symbol_completion_list (const char *text0, const char *word, data.word = word; data.wild_match = wild_match_p; data.encoded = encoded_p; - expand_partial_symbol_names (ada_expand_partial_symbol_name, &data); + expand_symtabs_matching (NULL, ada_complete_symbol_matcher, ALL_DOMAIN, + &data); } /* At this point scan through the misc symbol vectors and add each @@ -12513,11 +12515,8 @@ ada_add_global_exceptions (regex_t *preg, VEC(ada_exc_info) **exceptions) struct objfile *objfile; struct symtab *s; - ALL_OBJFILES (objfile) - if (objfile->sf) - objfile->sf->qf->expand_symtabs_matching - (objfile, NULL, ada_exc_search_name_matches, - VARIABLES_DOMAIN, preg); + expand_symtabs_matching (NULL, ada_exc_search_name_matches, + VARIABLES_DOMAIN, preg); ALL_PRIMARY_SYMTABS (objfile, s) { |