From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2782 invoked by alias); 30 Dec 2010 23:35:57 -0000 Received: (qmail 2592 invoked by uid 22791); 30 Dec 2010 23:35:56 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 30 Dec 2010 23:35:51 +0000 Received: from mailhost3.vmware.com (mailhost3.vmware.com [10.16.27.45]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 293527028; Thu, 30 Dec 2010 15:35:49 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost3.vmware.com (Postfix) with ESMTP id 1E5A8CD958; Thu, 30 Dec 2010 15:35:49 -0800 (PST) Message-ID: <4D1D1754.9060401@vmware.com> Date: Fri, 31 Dec 2010 06:35:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: Joel Brobecker CC: Eli Zaretskii , "gdb-patches@sourceware.org" Subject: Re: [RFA] unexpected multiple location for breakpoint References: <1290474625-1582-1-git-send-email-brobecker@adacore.com> <20101126172942.GK2634@adacore.com> <20101127183532.GA10136@caradoc.them.org> <20101210122337.GC2596@adacore.com> <20101228112546.GB2436@adacore.com> <83tyhxbthv.fsf@gnu.org> <20101229054841.GF2396@adacore.com> <83oc84bgv3.fsf@gnu.org> <20101230080009.GJ2396@adacore.com> In-Reply-To: <20101230080009.GJ2396@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: 2010-12/txt/msg00567.txt.bz2 Joel Brobecker wrote: >>> I worry about the effect at -O0. It is common to see the same source >>> line being split across the code. For instance, with conditional >>> loops, the condition evaluation is often placed at the end of the >>> loop, and its code is associated to the initial line. >> Are you saying that GCC does that under -O0? I'd be surprised. But I >> realize that it does that for higher optimization levels. Still, my >> question is how would it be worse to have the inferior stop several >> times through the loop than not stop at all? > > Actually, it does, even at -O0. I don't think it's unreasonable. > I don't think we are worse, but the reason why I bring it up is because > it's a definite departure from what we've been trying to do so far > (minimize the number of breakpoint locations). In fact, the patch > that triggered this discussion was trying to go one step further. > So, I'm just wondering if there might be some issues that I am not > taking into consideration. > > I'm willing to make that change, but this is going to require general > consent among the maintainers (and I'm not looking forward to all > the mods in the testsuite to adjust it :-/). I haven't been following the discussion all that closely. I know that some statements, such as for loops, do tend to get broken up even at -O0, and gdb has various means of compensating for it. I'm not sure what the situation is/was with single-location breakpoints... I imagine that the break at the for loop would only be hit on the first iteration.