From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2754 invoked by alias); 3 Feb 2011 22:54:01 -0000 Received: (qmail 2621 invoked by uid 22791); 3 Feb 2011 22:53:57 -0000 X-SWARE-Spam-Status: No, hits=-0.3 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mailgw.tensilica.com (HELO mailgw.tensilica.com) (65.119.96.134) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Feb 2011 22:53:43 +0000 Received: from localhost (unknown [127.0.0.1]) by mailgw.tensilica.com (Postfix) with ESMTP id 4C72A116091C; Thu, 3 Feb 2011 22:53:41 +0000 (UTC) Received: from mailgw.tensilica.com ([127.0.0.1]) by localhost (mailgw.tensilica.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 14067-09; Thu, 3 Feb 2011 14:53:41 -0800 (PST) Received: from mail.tensilica.com (mail.tensilica.com [192.168.15.138]) by mailgw.tensilica.com (Postfix) with ESMTP id E2B8D116091B; Thu, 3 Feb 2011 14:53:40 -0800 (PST) Received: from [192.168.11.68] (192.168.11.68) by mail.tensilica.com (192.168.15.138) with Microsoft SMTP Server id 8.2.254.0; Thu, 3 Feb 2011 14:53:40 -0800 Message-ID: <4D4B31F4.7040407@tensilica.com> Date: Thu, 03 Feb 2011 22:54:00 -0000 From: Maxim Grigoriev User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.10 MIME-Version: 1.0 To: Joel Brobecker CC: "gdb-patches@sourceware.org" , Marc Gauthier , Maxim Grigoriev Subject: Re: Faster stepping amidst breakpoints References: <4D3A114D.7010301@tensilica.com> <20110123001433.GA6352@caradoc.them.org> <20110131044951.GG2384@adacore.com> In-Reply-To: <20110131044951.GG2384@adacore.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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/msg00055.txt.bz2 On 01/30/2011 08:49 PM, 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? > > In terms of when, perhaps a good time to switch would be either > now (about 3 weeks away from planned 7.3 branching), or in 3 weeks > from now, right after branching. > I have Three observations. 1) I think changing the default is a good idea, when it's proven safe. I tested it on Xtensa GDB 7.1, which is probably not as valuable as testing results you are waiting for. With the default changed to always-inserted == on and the target understanding z/Z-packets, I observe a regression : (gdb) FAIL: gdb.base/break.exp: finish from called function (gdb) FAIL: gdb.base/callfuncs.exp: finish from call dummy breakpoint returns correct value FAIL: gdb.base/callfuncs.exp: finish after stop in call dummy preserves register contents FAIL: gdb.base/callfuncs.exp: return after stop in call dummy preserves register contents (gdb) FAIL: gdb.base/callfuncs.exp: Finish from nested call level 4 (gdb) FAIL: gdb.base/callfuncs.exp: backtrace after finish from nested call level 4 (gdb) FAIL: gdb.base/callfuncs.exp: Finish from nested call level 3 (gdb) FAIL: gdb.base/callfuncs.exp: backtrace after finish from nested call level 3 (gdb) FAIL: gdb.base/callfuncs.exp: Finish from nested call level 2 (gdb) FAIL: gdb.base/callfuncs.exp: backtrace after finish from nested call level 2 (gdb) FAIL: gdb.base/callfuncs.exp: Finish from nested call level 1 FAIL: gdb.base/callfuncs.exp: nested call dummies preserve register contents (gdb) FAIL: gdb.base/sepdebug.exp: finish from called function All new failures were caused by attempting to remove non-existent breakpoint. 2) I think in the embedded-system world it does matter when crashing / detaching GDB leaves target memory and/or registers changed. 3) In my original question I was talking about possible GDB protocol extensions introducing a concept of a "smart" target agent ( if such a term is appropriate here ). What I meant was a target agent, which can -- realize it's about to single-step over an inserted breakpoint and then handle it properly ; -- watch out for shutting-down GDB communications, while counting time-outs, and then return target to the reliable state essentially making GDB non-intrusive. If such functionality existed GDB would be able to discover that the target agent is "smart" and then safely switch to the breakpoint-always-inserted==on mode even when it's used in the embedded system environment. -- Maxim