aboutsummaryrefslogtreecommitdiff
path: root/gdb/completer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/completer.c')
-rw-r--r--gdb/completer.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gdb/completer.c b/gdb/completer.c
index 4735aa5..deecbc2 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -1,5 +1,5 @@
/* Line completion stuff for GDB, the GNU debugger.
- Copyright (C) 2000-2024 Free Software Foundation, Inc.
+ Copyright (C) 2000-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -356,7 +356,7 @@ gdb_completer_file_name_quote_1 (const char *text, char quote_char)
if (quote_char == '\'')
{
/* There is no backslash escaping permitted within a single quoted
- string, so in this case we can just return the input sting. */
+ string, so in this case we can just return the input string. */
str = text;
}
else if (quote_char == '"')
@@ -1008,7 +1008,7 @@ complete_files_symbols (completion_tracker &tracker,
name, they cannot be asking for completion on files. */
if (strcspn (text, gdb_completer_file_name_break_characters)
== text_len)
- fn_list = make_source_files_completion_list (text, text);
+ fn_list = make_source_files_completion_list (text);
}
if (!fn_list.empty () && !tracker.have_completions ())
@@ -1059,7 +1059,7 @@ complete_source_filenames (const char *text)
the user cannot be asking for completion on files. */
if (strcspn (text, gdb_completer_file_name_break_characters)
== text_len)
- return make_source_files_completion_list (text, text);
+ return make_source_files_completion_list (text);
return {};
}
@@ -1142,7 +1142,7 @@ collect_explicit_location_matches (completion_tracker &tracker,
const char *source
= string_or_empty (explicit_loc->source_filename.get ());
completion_list matches
- = make_source_files_completion_list (source, source);
+ = make_source_files_completion_list (source);
tracker.add_completions (std::move (matches));
}
break;
@@ -3513,9 +3513,7 @@ skip_over_slash_fmt (completion_tracker &tracker, const char **args)
return false;
}
-void _initialize_completer ();
-void
-_initialize_completer ()
+INIT_GDB_FILE (completer)
{
/* Setup some readline completion globals. */
rl_completion_word_break_hook = gdb_completion_word_break_characters;