From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1774 invoked by alias); 12 Aug 2008 06:23:56 -0000 Received: (qmail 1684 invoked by uid 22791); 12 Aug 2008 06:23:55 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Aug 2008 06:23:17 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KSnHj-00017k-U7 for gdb-patches@sources.redhat.com; Tue, 12 Aug 2008 06:23:11 +0000 Received: from 78.158.192.230 ([78.158.192.230]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Aug 2008 06:23:11 +0000 Received: from vladimir by 78.158.192.230 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 12 Aug 2008 06:23:11 +0000 To: gdb-patches@sources.redhat.com From: Vladimir Prus Subject: Re: Add a third mode to "breakpoints always-inserted", and make it the default Date: Tue, 12 Aug 2008 06:23:00 -0000 Message-ID: References: <200808120034.25338.pedro@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit User-Agent: KNode/0.10.9 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-08/txt/msg00311.txt.bz2 Pedro Alves wrote: > Non-stop mode requires that breakpoints always be inserted > in the inferior. We currently set that with "set breakpoints always-inserted" > prior to switching to non-stop mode with "set non-stop on". > > The default setting of "set breakpoints always-inserted" is "off", > as that is how GDB has been behaving for ages. > > Since non-stop requires breakpoints always-in, its just cumbersome > to have to issue more than one command to enable non-stop mode. > > So, this patch changes the "set breakpoints always-inserted" setting to > be a three-state. on and off, the same as before, and a new mode, > "follow-non-stop". In the latter mode, GDB will behave as "on", if > we're in non-stop mode, and as "off" if we're in all-stop mode. > > This mode will be the default. > > (gdb) show non-stop > Controlling the inferior in non-stop mode is off. > > We're in all-stop. > > (gdb) show breakpoint always-inserted > Always inserted breakpoint mode is follow-non-stop (currently off). > > GDB shows that the effect is as if "off". > > (gdb) set non-stop on > > Turns non-stop on. > > (gdb) show breakpoint always-inserted > Always inserted breakpoint mode is follow-non-stop (currently on). > > GDB shows that the effect is as if "on". > > (gdb) set non-stop off > > Back to all-stop. > > (gdb) set breakpoint always-inserted on > > Force "on". Useful for testing. > > (gdb) show breakpoint always-inserted > Always inserted breakpoint mode is on. > > Now GDB shows that "on", independently of the non-stop mode. > > What do you think? Well, this is smart, but do we need it? As I've said in earlier email, I'm no longer sure we need one command to enable everything. - Volodya