diff options
author | Guinevere Larsen <guinevere@redhat.com> | 2025-07-23 09:06:22 -0300 |
---|---|---|
committer | Guinevere Larsen <guinevere@redhat.com> | 2025-07-25 13:32:43 -0300 |
commit | c75f4b5c34e4aaec804c32cd44a4cfb0ce32fdfc (patch) | |
tree | fc956f9f7b94c9688be7ec23b6d4bde33b1f1291 | |
parent | 9cdccc47441e64b8e67a99b0fff8a6bf5f9a72a0 (diff) | |
download | binutils-c75f4b5c34e4aaec804c32cd44a4cfb0ce32fdfc.zip binutils-c75f4b5c34e4aaec804c32cd44a4cfb0ce32fdfc.tar.gz binutils-c75f4b5c34e4aaec804c32cd44a4cfb0ce32fdfc.tar.bz2 |
gdb: use the location_completer for the list command
The "location_completer" function has been available for a long time,
but it was seemingly never used as the completer for the list function.
A quick check through git history shows that a similar completer was
available for the "edit" command but wasn't added to "list" with no
reasoning for it.
I think "list" should use the location_completer, as it is more aware of
the locspec grammar.
Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r-- | gdb/cli/cli-cmds.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c index 5e887f5..868f12c 100644 --- a/gdb/cli/cli-cmds.c +++ b/gdb/cli/cli-cmds.c @@ -2898,6 +2898,7 @@ This can be changed using \"set listsize\", and the current value\n\ can be shown using \"show listsize\".")); add_com_alias ("l", list_cmd, class_files, 1); + set_cmd_completer(list_cmd, location_completer); c = add_com ("disassemble", class_vars, disassemble_command, _("\ Disassemble a specified section of memory.\n\ |