From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17880 invoked by alias); 14 Apr 2010 11:59:33 -0000 Received: (qmail 17869 invoked by uid 22791); 14 Apr 2010 11:59:32 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Apr 2010 11:59:24 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3EBxN37020064 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 14 Apr 2010 07:59:23 -0400 Received: from qcore.mollernet.net (vpn-10-12.rdu.redhat.com [10.11.10.12]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3EBxM89020596 for ; Wed, 14 Apr 2010 07:59:22 -0400 Message-ID: <4BC5AE1A.8050900@redhat.com> Date: Wed, 14 Apr 2010 11:59:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: A patch I'd like to propose. Content-Type: multipart/mixed; boundary="------------000902070502090704000601" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-04/txt/msg00444.txt.bz2 This is a multi-part message in MIME format. --------------000902070502090704000601 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 131 Adds the command "quickquit," aliased to "qq," to cli/cli-cmds.c. It eliminates that annoying quit_confirm() when quitting gdb. --------------000902070502090704000601 Content-Type: text/x-patch; name="quickquit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="quickquit.patch" Content-length: 1689 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); --------------000902070502090704000601--