From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26549 invoked by alias); 1 Feb 2011 15:12:10 -0000 Received: (qmail 26530 invoked by uid 22791); 1 Feb 2011 15:12:08 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,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; Tue, 01 Feb 2011 15:12:03 +0000 Received: (qmail 16440 invoked from network); 1 Feb 2011 15:12:02 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Feb 2011 15:12:02 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: Faster stepping amidst breakpoints Date: Tue, 01 Feb 2011 15:12:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: Daniel Jacobowitz , Joel Brobecker , Maxim Grigoriev , Marc Gauthier , Stan Shebs References: <4D3A114D.7010301@tensilica.com> <20110131044951.GG2384@adacore.com> <20110131151229.GA2915@caradoc.them.org> In-Reply-To: <20110131151229.GA2915@caradoc.them.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102011512.24360.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: 2011-02/txt/msg00004.txt.bz2 On Tuesday 01 February 2011 15:12:35, Daniel Jacobowitz wrote: > On Mon, Jan 31, 2011 at 08:49:51AM +0400, Joel Brobecker wrote: > > > Consider "set breakpoint always-inserted". > > > I've been wondering lately if we should flip the default. > > > > I like the idea of changing the default. > > > > Do you know what the risks would be? I looked at the code, and > > there isn't something obvious/delicate, it seems. Perhaps we might > > find ourselves forgetting to re-insert breakpoints, or inserting > > them twice? I think you guys have more experience than we do? > > As far as I can remember (you know how much GDB development I do > nowadays), the only risks were if GDB crashed and left the application > with breakpoints inserted. Of course, I'm in favor of GDB not > crashing. > > Pedro, Stan, any thoughts? Regarding the OP's: >Certain GDB operations involve a lot of single-stepping, >which can be really slow on certain targets (especially >embedded targets) because of that latency." and the $subject: > Faster stepping amidst breakpoints ... scenario, I'm not certain always-inserted alone helps that much, because what always-inserted mainly affects, is whether GDB removes breakpoints before giving the prompt to the user, after the whole command finishes; and whether a "break" or "delete" command inserts/removes breakpoints in the target immediately. In all-stop mode, without displaced stepping enabled, when stepping amidst breakpoints, even with "breakpoint always-inserted on", GDB _will still_ remove/insert all breakpoints to single-step over a location that has a breakpoint. It sounds to me that what you need to optimize that use case, is to make GDB smarter into only remove/inserting the breakpoint being stepped over, instead of always remove/inserting _all_ breakpoints. -- Pedro Alves