From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13111 invoked by alias); 1 Apr 2008 19:55:42 -0000 Received: (qmail 13103 invoked by uid 22791); 1 Apr 2008 19:55:42 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.25) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 01 Apr 2008 19:55:12 +0000 Received: from kahikatea.snap.net.nz (187.61.255.123.dynamic.snap.net.nz [123.255.61.187]) by viper.snap.net.nz (Postfix) with ESMTP id CD7583D9F7E; Wed, 2 Apr 2008 08:55:09 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 537118FC6D; Wed, 2 Apr 2008 07:55:08 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18418.37659.924305.827404@kahikatea.snap.net.nz> Date: Tue, 01 Apr 2008 22:30:00 -0000 To: tromey@redhat.com Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Using bt command in async mode In-Reply-To: References: <18417.38670.195071.81191@kahikatea.snap.net.nz> X-Mailer: VM 7.19 under Emacs 22.1.92.3 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: 2008-04/txt/msg00028.txt.bz2 > Nick> This patch allows the bt to be executed in async mode while the > Nick> inferior is executing. > > Nick> ! && strcmp (c->name, "interrupt") != 0 > Nick> ! && strcmp (c->name, "bt") != 0) > > I've seen a couple patches recently that touch this conditional. > > What do you think of this? It moves the flag into the command object > instead of hard-coding it into a big 'if'. Sure, the list will only get longer. In the long run it might be a good idea to add an argument to add_cmd and related functions. Incidentally, the patch I've presented for bt isn't suitable for inclusion as it uses: + + if (restart) + continue_command ("&", 0); If the user interrupts with 'bt' during a step, he presumably wants the step to finish. I'm not sure how easy it is for Gdb to jump the inferior back into it's old state of execution. -- Nick http://www.inet.net.nz/~nickrob