public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/record: remove unnecessary use of filename_completer
@ 2024-04-17 12:42 Andrew Burgess
0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2024-04-17 12:42 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c25c939387cfc378c01fb5eb7f49c78c03b8cdcb
commit c25c939387cfc378c01fb5eb7f49c78c03b8cdcb
Author: Andrew Burgess <aburgess@redhat.com>
Date: Mon Apr 15 13:48:34 2024 +0100
gdb/record: remove unnecessary use of filename_completer
Spotted that the 'record' command has its completer set to
filename_completer. The problem is that 'record' is a prefix command,
as such, its completer is hard-coded to complete on sub-commands. The
attempt to use filename_completer is irrelevant.
The 'record' command is itself a command though, that is, a user can
do this:
(gdb) record
which is really just an alias for:
(gdb) target record-full
Nowhere does cmd_record_start (which is called when 'record' is used)
expect a filename, and 'target record-full' doesn't expect a filename
either.
So lets just drop the line which sets filename_completer as the
completer for 'record'.
Approved-By: Tom Tromey <tom@tromey.com>
Diff:
---
gdb/record.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/gdb/record.c b/gdb/record.c
index 1843969c2c9..25a4c1e71b6 100644
--- a/gdb/record.c
+++ b/gdb/record.c
@@ -791,8 +791,6 @@ A size of \"unlimited\" means unlimited lines. The default is 10."),
= add_prefix_cmd ("record", class_obscure, cmd_record_start,
_("Start recording."),
&record_cmdlist, 0, &cmdlist);
- set_cmd_completer (record_cmd, filename_completer);
-
add_com_alias ("rec", record_cmd, class_obscure, 1);
set_show_commands setshow_record_cmds
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-17 12:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-17 12:42 [binutils-gdb] gdb/record: remove unnecessary use of filename_completer Andrew Burgess
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).