This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
A patch I'd like to propose.
- From: Chris Moller <cmoller at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 14 Apr 2010 07:59:22 -0400
- Subject: A patch I'd like to propose.
Adds the command "quickquit," aliased to "qq," to cli/cli-cmds.c. It
eliminates that annoying quit_confirm() when quitting gdb.
Index: cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.100
diff -u -r1.100 cli-cmds.c
--- cli-cmds.c 9 Apr 2010 03:00:58 -0000 1.100
+++ cli-cmds.c 14 Apr 2010 11:49:19 -0000
@@ -329,7 +329,7 @@
immediate_quit--;
}
-/* Handle the quit command. */
+/* Handle the quit commands. */
void
quit_command (char *args, int from_tty)
@@ -342,6 +342,14 @@
quit_force (args, from_tty);
}
+void
+quick_quit_command (char *args, int from_tty)
+{
+ disconnect_tracing (from_tty);
+
+ quit_force (args, from_tty);
+}
+
static void
pwd_command (char *args, int from_tty)
{
@@ -1400,10 +1408,13 @@
show_script_ext_mode,
&setlist, &showlist);
+ add_com ("quickquit", class_support, quick_quit_command,
+ _("Exit gdb without confirmation."));
add_com ("quit", class_support, quit_command, _("Exit gdb."));
c = add_com ("help", class_support, help_command,
_("Print list of commands."));
set_cmd_completer (c, command_completer);
+ add_com_alias ("qq", "quickquit", class_support, 1);
add_com_alias ("q", "quit", class_support, 1);
add_com_alias ("h", "help", class_support, 1);
Index: cli-cmds.h
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.h,v
retrieving revision 1.14
diff -u -r1.14 cli-cmds.h
--- cli-cmds.h 1 Jan 2010 07:31:46 -0000 1.14
+++ cli-cmds.h 14 Apr 2010 11:49:19 -0000
@@ -119,6 +119,7 @@
/* Exported to gdb/top.c and gdb/main.c */
+extern void quick_quit_command (char *, int);
extern void quit_command (char *, int);
extern void source_script (char *, int);