From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4229 invoked by alias); 14 Apr 2010 17:20:00 -0000 Received: (qmail 4220 invoked by uid 22791); 14 Apr 2010 17:19:58 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Apr 2010 17:19:52 +0000 Received: (qmail 24885 invoked from network); 14 Apr 2010 17:19:51 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Apr 2010 17:19:51 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: A patch I'd like to propose. Date: Wed, 14 Apr 2010 17:20:00 -0000 User-Agent: KMail/1.12.2 (Linux/2.6.31-20-generic; KDE/4.3.2; x86_64; ; ) Cc: Chris Moller , Phil Muldoon References: <4BC5AE1A.8050900@redhat.com> <4BC5CEF0.8080408@redhat.com> <4BC5D144.2080105@redhat.com> In-Reply-To: <4BC5D144.2080105@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201004141819.48480.pedro@codesourcery.com> 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/msg00453.txt.bz2 On Wednesday 14 April 2010 15:29:24, Chris Moller wrote: > On 04/14/10 10:19, Phil Muldoon wrote: > > On 04/14/2010 12:59 PM, Chris Moller wrote: > > > >> Adds the command "quickquit," aliased to "qq," to cli/cli-cmds.c. It > >> eliminates that annoying quit_confirm() when quitting gdb. > >> > > > > 'set confirm off' works for me? Though this is not the default it > > seems. Is this orthogonal to your request, or did you want an > > explicit command to act regardless of confirm off/on? > > > > I'm looking for something that always works without me having to make > any special arrangement for it. I use a lot of bizarre environments in > debugging and a lot of the time I've forgotten things like copying over > my usual~/.gdbinit That's what you should be fixing then, isn't it? ;-) define qq set confirm off quit end Kinda misses the scripting point we add commands for everything that's _already_ easily possible, even with CLI scripting. In any case, I'd be okay with this with the following constrains: * It was rather called "quit-force", or something similarly, so that: - q does't stop completing to "quit", but instead even proposes "quit"/"quit-force" to the user. As bonus, users notice the new command is available. - the fact that `qq' is typo-prone is avoided. E.g., "quit-force" -> qf. * q, qu, qui, remain unambiguous aliases to "quit". "quickquit" shares 3 initials with "quit", so q will stop working if aliases are not added. * You explain whether you mean for this to disable _all_ queries when quitting or not. I think that's what you meant. As is, it doesn't do that, because e.g., +void +quick_quit_command (char *args, int from_tty) +{ + disconnect_tracing (from_tty); ^^^^^^^^^^^^^^^^^^ This can query. + + quit_force (args, from_tty); +} * Of course, that this is documented in the manual. -- Pedro Alves