aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-cmds.c
diff options
context:
space:
mode:
authorEnze Li <lienze2010@hotmail.com>2021-12-18 15:19:12 +0400
committerJoel Brobecker <brobecker@adacore.com>2021-12-18 15:19:12 +0400
commitfa8f0a0ff050352eb70ad7ccbcec87f99ced51e7 (patch)
tree01a114f8f1496571e282e2a656cfe3e1a5271b75 /gdb/cli/cli-cmds.c
parent8d34471f70a84e6db89be40116d1ed0f6af941c0 (diff)
downloadfsf-binutils-gdb-fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7.zip
fsf-binutils-gdb-fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7.tar.gz
fsf-binutils-gdb-fa8f0a0ff050352eb70ad7ccbcec87f99ced51e7.tar.bz2
gdb: add "exit" command as an alias for "quit"
This command adds the "exit" command as an alias for the "quit" command, as requested in PR gdb/28406. The documentation is also updated to mention this new command. Tested on x86_64-linux. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28406
Diffstat (limited to 'gdb/cli/cli-cmds.c')
-rw-r--r--gdb/cli/cli-cmds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 3fe4794..eca92ef 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -2445,7 +2445,7 @@ strict == evaluate script according to filename extension, error if not supporte
cmd_list_element *quit_cmd
= add_com ("quit", class_support, quit_command, _("\
Exit gdb.\n\
-Usage: quit [EXPR]\n\
+Usage: quit [EXPR] or exit [EXPR]\n\
The optional expression EXPR, if present, is evaluated and the result\n\
used as GDB's exit code. The default is zero."));
cmd_list_element *help_cmd
@@ -2453,6 +2453,7 @@ used as GDB's exit code. The default is zero."));
_("Print list of commands."));
set_cmd_completer (help_cmd, command_completer);
add_com_alias ("q", quit_cmd, class_support, 1);
+ add_com_alias ("exit", quit_cmd, class_support, 1);
add_com_alias ("h", help_cmd, class_support, 1);
add_setshow_boolean_cmd ("verbose", class_support, &info_verbose, _("\