public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* A patch I'd like to propose.
@ 2010-04-14 11:59 Chris Moller
  2010-04-14 14:19 ` Phil Muldoon
  2010-04-14 17:05 ` Joel Brobecker
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Moller @ 2010-04-14 11:59 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 131 bytes --]

Adds the command "quickquit," aliased to "qq," to cli/cli-cmds.c.   It 
eliminates that annoying quit_confirm() when quitting gdb.

[-- Attachment #2: quickquit.patch --]
[-- Type: text/x-patch, Size: 1689 bytes --]

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);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-04-14 17:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14 11:59 A patch I'd like to propose Chris Moller
2010-04-14 14:19 ` Phil Muldoon
2010-04-14 14:29   ` Chris Moller
2010-04-14 17:20     ` Pedro Alves
2010-04-14 17:05 ` Joel Brobecker
2010-04-14 17:20   ` Michael Snyder

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).