From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4763 invoked by alias); 5 Apr 2002 16:45:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4748 invoked from network); 5 Apr 2002 16:45:42 -0000 Received: from unknown (HELO freya.inter.net.il) (192.114.186.14) by sources.redhat.com with SMTP; 5 Apr 2002 16:45:42 -0000 Received: from zaretsky (diup-217-156.inter.net.il [213.8.217.156]) by freya.inter.net.il (Mirapoint Messaging Server MOS 2.9.3.2) with ESMTP id BHP77965; Fri, 5 Apr 2002 19:45:35 +0300 (IDT) Date: Fri, 05 Apr 2002 08:45:00 -0000 From: "Eli Zaretskii" To: drow@mvista.com Message-Id: <9743-Fri05Apr2002194115+0300-eliz@is.elta.co.il> CC: gdb-patches@sources.redhat.com In-reply-to: <20020405105416.A14105@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 5 Apr 2002 10:54:16 -0500) Subject: Re: [RFA] Fix watchpoints when stepping over a breakpoint Reply-to: Eli Zaretskii References: <20020402184333.A8464@nevyn.them.org> <6480-Fri05Apr2002103430+0300-eliz@is.elta.co.il> <20020405105416.A14105@nevyn.them.org> X-SW-Source: 2002-04/txt/msg00166.txt.bz2 > Date: Fri, 5 Apr 2002 10:54:16 -0500 > From: Daniel Jacobowitz > > > > Isn't this a bit ad hoc? I think the issue of doing TRT when both a > > breakpoint and a watchpoint fire for the same instruction needs a more > > general solution. While ignoring breakpoints might be the Right Thing > > in this particular case, I wonder what will be TRT in other cases? > > > > Did you try to arrange for a normal breakpoint and a watchpoint on the > > same instruction, and see what happens in that case, with and without > > this patch? > > Yes, I did - that's 'watch a.x' in gdb.c++/annota2.exp. Without the > patch it fails on i386-linux, with it it passes. ``Fails'' and ``passes'' are in the eyes of the beholder ;-) I mean, I'm not even sure what is the ``right'' behavior in this case. The annota2.exp test expects something very specific, but is that what we want? Perhaps GDB should say that both breakpoint and watchpoint fired instead, or do something else? I'd suggest to discuss this a bit, because otherwise I don't even know what are the criteria for approving or rejecting the patch. The mere fact that the number of testsuite failures goes down is not enough, IMHO. > I don't really think it's any more ad-hoc than the trap_expected flag. Perhaps not, but that doesn't mean we should proliferate ad-hoc'ery. More importantly, an introduction of a general-purpose mechanism to ignore breakpoints is something that I consider to be dangerous, because it is no longer limited to special situations such as single-stepping.