From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24415 invoked by alias); 16 Apr 2004 07:18:07 -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 24406 invoked from network); 16 Apr 2004 07:18:06 -0000 Received: from unknown (HELO aragorn.inter.net.il) (192.114.186.23) by sources.redhat.com with SMTP; 16 Apr 2004 07:18:06 -0000 Received: from zaretski ([80.230.156.11]) by aragorn.inter.net.il (MOS 3.4.5-GR) with ESMTP id CRW96331; Fri, 16 Apr 2004 10:17:17 +0300 (IDT) Date: Fri, 16 Apr 2004 07:18:00 -0000 From: "Eli Zaretskii" To: Orjan Friberg Message-Id: <7494-Fri16Apr2004101245+0300-eliz@gnu.org> CC: drow@false.org, gdb-patches@sources.redhat.com In-reply-to: <407E8CEF.2050007@axis.com> (message from Orjan Friberg on Thu, 15 Apr 2004 15:23:59 +0200) 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> <6654-Thu15Apr2004111217+0300-eliz@gnu.org> <407E8CEF.2050007@axis.com> X-SW-Source: 2004-04/txt/msg00345.txt.bz2 > Date: Thu, 15 Apr 2004 15:23:59 +0200 > From: Orjan Friberg > > The test program (repeated below) *does* work for i386 (though I didn't > say that), because it also stops when foo is written (thus updating the > value of foo when watchpoint_check is called), so by the time it stops > when the second read happens the value hasn't changed since the last > time and GDB decides it's a valid hit. Right; sorry I forgot about that. It's been a long time since I hacked that part of GDB. > 1. Add a check if the target cannot set "pure" read watchpoints to the > b->type == bp_read_watchpoint check at WP_VALUE_CHANGED (my > interpretation of Eli's suggestion). On balance, this is probably the best solution, although it's not quite clean. The ability to set read watchpoints would be part of the architecture vector, right? > 2. Somehow don't update the value in watchpoint_check when it's a false > hit. (Then the b->type == bp_read_watchpoint check at WP_VALUE_CHANGED > isn't needed.) Wouldn't this reintroduce the bug that I was trying to solve back then? That is, will GDB still DTRT when both rwatch and watch are set at the same variable? > 3. Add some distinction between "wanted watchpoint type" and "actual > watchpoint type". Any specific ideas how to do that? For that matter, what is ``wanted watchpoint type'', and how can we decide that?