aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 7d1a0b0..302f4eb 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -6402,7 +6402,7 @@ add_partial_filename_data::operator() (const char *filename,
program. */
completion_list
-make_source_files_completion_list (const char *text, const char *word)
+make_source_files_completion_list (const char *text)
{
size_t text_len = strlen (text);
completion_list list;
@@ -6428,7 +6428,7 @@ make_source_files_completion_list (const char *text, const char *word)
{
/* This file matches for a completion; add it to the current
list of matches. */
- add_filename_to_list (s->filename, text, word, &list);
+ add_filename_to_list (s->filename, text, text, &list);
}
else
{
@@ -6440,7 +6440,7 @@ make_source_files_completion_list (const char *text, const char *word)
if (base_name != s->filename
&& !filenames_seen.seen (base_name)
&& filename_ncmp (base_name, text, text_len) == 0)
- add_filename_to_list (base_name, text, word, &list);
+ add_filename_to_list (base_name, text, text, &list);
}
}
}
@@ -6448,7 +6448,7 @@ make_source_files_completion_list (const char *text, const char *word)
datum.filename_seen_cache = &filenames_seen;
datum.text = text;
- datum.word = word;
+ datum.word = text;
datum.text_len = text_len;
datum.list = &list;
map_symbol_filenames (datum, false /*need_fullname*/);
@@ -6986,11 +6986,8 @@ info_module_subcommand (bool quiet, const char *module_regexp,
const char *last_filename = "";
const symbol *last_module_symbol = nullptr;
- for (const module_symbol_search &ms : module_symbols)
+ for (const auto &[p, q] : module_symbols)
{
- const symbol_search &p = ms.first;
- const symbol_search &q = ms.second;
-
gdb_assert (q.symbol != nullptr);
if (last_module_symbol != p.symbol)