From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27971 invoked by alias); 15 Apr 2004 08:17:13 -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 27958 invoked from network); 15 Apr 2004 08:17:12 -0000 Received: from unknown (HELO aragorn.inter.net.il) (192.114.186.23) by sources.redhat.com with SMTP; 15 Apr 2004 08:17:12 -0000 Received: from zaretski (pns03-202-32.inter.net.il [80.230.202.32]) by aragorn.inter.net.il (MOS 3.4.5-GR) with ESMTP id CRQ80158; Thu, 15 Apr 2004 11:16:11 +0300 (IDT) Date: Thu, 15 Apr 2004 08:17:00 -0000 From: "Eli Zaretskii" To: Daniel Jacobowitz Message-Id: <6654-Thu15Apr2004111217+0300-eliz@gnu.org> CC: orjan.friberg@axis.com, gdb-patches@sources.redhat.com In-reply-to: <20040406142228.GA29473@nevyn.them.org> (message from Daniel Jacobowitz on Tue, 6 Apr 2004 10:22:28 -0400) Subject: Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT Reply-to: Eli Zaretskii References: <407282F4.2080602@axis.com> <20040406142228.GA29473@nevyn.them.org> X-SW-Source: 2004-04/txt/msg00299.txt.bz2 Sorry for a late response: I was travelling beyond the reach of my email. > Date: Tue, 6 Apr 2004 10:22:28 -0400 > From: Daniel Jacobowitz > > Presumably, the relevant part of the comment is the second half: "this > is for targets which cannot set read-only watchpoints". Yes. The x86 processors belong to that family, so we didn't just change the mainline code for dome isoteric CPU. > On the other hand, it does not sound like that code will work for > targets which _can_ set read-only watchpoints. Patches to make that work for those platforms are welcome. However, it seems to me that the right thing to do is to fix the cited code in bpstat_stop_status (and perhaps elsewhere in breakpoint.c) to DTRT for the test program posted by Orjan, since it clearly should work with i386 as well, and since this specific failure of GDB has nothing to do with read-only vs read-write watchpoints. > The patch was: > > 2000-03-21 Eli Zaretskii > > * breakpoint.c (bpstat_stop_status): Don't stop if a read > watchpoint appears to break, but the watched value changed. See the test program that reveals the original problem I wanted to fix, and the ensuing discussion, here: http://sources.redhat.com/ml/gdb-patches/2000-03/msg00174.html Any suggested patch should not break what was fixed back then. AFAIR, without the value-changed test, the rwatch watchpoints were totally unusable on x86, they would simply fire every time the watched variable is set. So simply removing the test is not the way to solve this, IMHO. Btw, a workaround for the case in point is to use awatch, but of course if rwatch can be fixed to avoid failure here, it's a better solution.