From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4091 invoked by alias); 17 Feb 2006 20:16:22 -0000 Received: (qmail 4083 invoked by uid 22791); 17 Feb 2006 20:16:22 -0000 X-Spam-Check-By: sourceware.org Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 17 Feb 2006 20:16:20 +0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id k1HKGHTa001388 for ; Fri, 17 Feb 2006 15:16:18 -0500 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id k1HKGHGF001383; Fri, 17 Feb 2006 15:16:17 -0500 Received: from pkoning.equallogic.com ([172.16.1.169]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 17 Feb 2006 15:16:04 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17398.12047.624911.347942@gargle.gargle.HOWL> Date: Fri, 17 Feb 2006 20:18:00 -0000 From: Paul Koning To: drow@false.org Cc: eliz@gnu.org, ghost@cs.msu.su, gdb@sources.redhat.com Subject: Re: MI: reporting of multiple breakpoints References: <20060217153211.GA21402@nevyn.them.org> <20060217194426.GA28988@nevyn.them.org> <17398.11182.747232.774924@gargle.gargle.HOWL> <20060217200712.GB30145@nevyn.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00212.txt.bz2 >>>>> "Daniel" == Daniel Jacobowitz writes: Daniel> On Fri, Feb 17, 2006 at 03:01:50PM -0500, Paul Koning wrote: >> I think it is wrong to step around a breakpoint that's set at a >> different instruction than one that triggers a watchpoint. For >> example, suppose I'm monitoring a variable by setting a >> watchpoint, and setting up a command sequence to print an >> expression and continue. Separate from that, I want the program >> to break at line x. >> >> It is a bad thing for the break at x to fail due to the bad luck >> of having a watch exception at the preceding instruction. If the >> two stops happened to be the SAME instruction, then you have >> plausible deniability. But not if they are different >> instructions. Daniel> This just doesn't scale. Now the user places two breakpoints Daniel> at foo (via complicated scripts, say) and one of them has Daniel> continue in its commands list. The user could make the exact Daniel> same argument to complain that we "didn't stop". That's not the same case. I was going to say that both stops should be reported even if they are at the SAME address, then decided against that, as you did. But in the case we're talking about, you could have this source code: 421 foo=1; 422 bar=2; I set a breakpoint on line 422, and a watchpoint on "foo". Clearly those are very different -- line 422 doesn't touch foo, and the line that touches foo isn't line 422. GDB should not confuse those two things. If the hardware or GDB advances the PC across the watched instruction, that's very well but that doesn't mean GDB should believe the stop point is the instruction after. The stop point is the store into foo, which isn't line 422. paul