aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-04 23:02:18 +0200
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>2020-05-15 22:17:45 +0200
commita7b9ceb8b44cd36496e266894075e2af60c3e153 (patch)
treef5234249dcf0b82411769af36184b1ae69a7d26e /gdb/cli
parentb2188a06e4583067a503fbc271e110e814890cc1 (diff)
downloadgdb-a7b9ceb8b44cd36496e266894075e2af60c3e153.zip
gdb-a7b9ceb8b44cd36496e266894075e2af60c3e153.tar.gz
gdb-a7b9ceb8b44cd36496e266894075e2af60c3e153.tar.bz2
Fix the only incorrect case found by command_structure_invariants selftest.
The next commit introduces a selftest that detects when the GDB command structure does not define a tree when using the pointers 'next/*prefixlist'. This test detects one such case, fixed by this commit. The command 'info set' was defined as a specific prefix command, but re-using the command list already used for the 'show' command. This leads to the command tree 'next/*prefixlist' to not be a tree. This change defines 'info set ' as an alias, thereby fixing the selftest. 2020-05-15 Philippe Waroquiers <philippe.waroquiers@skynet.be> * cli/cli-cmds.c (_initialize_cli_cmds): Define 'info set' as an alias of 'show'.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-cmds.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 58e9cf3..c17521b 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2209,12 +2209,11 @@ Generic command for showing things about the program being debugged."),
add_com ("complete", class_obscure, complete_command,
_("List the completions for the rest of the line as a command."));
- add_show_prefix_cmd ("show", class_info, _("\
+ c = add_show_prefix_cmd ("show", class_info, _("\
Generic command for showing things about the debugger."),
- &showlist, "show ", 0, &cmdlist);
+ &showlist, "show ", 0, &cmdlist);
/* Another way to get at the same thing. */
- add_show_prefix_cmd ("set", class_info, _("Show all GDB settings."),
- &showlist, "info set ", 0, &infolist);
+ add_alias_cmd ("set", c, class_info, 0, &infolist);
c = add_com ("with", class_vars, with_command, _("\
Temporarily set SETTING to VALUE, run COMMAND, and restore SETTING.\n\