From: Chris Moller <cmoller@redhat.com>
To: gdb-patches@sourceware.org
Subject: A patch I'd like to propose.
Date: Wed, 14 Apr 2010 11:59:00 -0000 [thread overview]
Message-ID: <4BC5AE1A.8050900@redhat.com> (raw)
[-- 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);
next reply other threads:[~2010-04-14 11:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-14 11:59 Chris Moller [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BC5AE1A.8050900@redhat.com \
--to=cmoller@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox