From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13803 invoked by alias); 4 Dec 2001 13:51:30 -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 13570 invoked from network); 4 Dec 2001 13:51:21 -0000 Received: from unknown (HELO miranda.axis.se) (193.13.178.2) by sources.redhat.com with SMTP; 4 Dec 2001 13:51:21 -0000 Received: from ironmaiden.axis.se (ironmaiden.axis.se [10.13.8.120]) by miranda.axis.se (8.12.1/8.12.1/Debian -2) with ESMTP id fB4Dp8XX019680; Tue, 4 Dec 2001 14:51:08 +0100 Received: from axis.com (localhost [127.0.0.1]) by ironmaiden.axis.se (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id OAA19025; Tue, 4 Dec 2001 14:51:08 +0100 X-Authentication-Warning: ironmaiden.axis.se: Host localhost [127.0.0.1] claimed to be axis.com Message-ID: <3C0CD4CC.45C2595@axis.com> Date: Tue, 04 Dec 2001 05:51:00 -0000 From: Orjan Friberg Organization: Axis Communications AB X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.19 i686) X-Accept-Language: en MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sources.redhat.com Subject: Re: Hardware watchpoints; dealing with false triggers? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00091.txt.bz2 Eli Zaretskii wrote: > > I need to correct myself: there's a subtle point I forgot to mention. > The current code only calls target_stopped_data_address for read and > access watchpoints (those set by `rwatch' and `awatch' commands), but not > for regular, i.e. data-write, hardware watchpoints (those set by `watch' > command). Instead, GDB compares the previous and the current value of > the watched expression, and if they differ, it decides that the > corresponding watchpoint triggered, without ever considering the address! Hm, I explicitly considered that a non-problem. (In my original post in this thread I wrote: "For the current [data-]write watchpoint implementation in gdb, false triggers wouldn't be a problem, since the value of the variable wouldn't change.") The way hardware data-write watchpoints work now, the lack of a target_stopped_data_address wouldn't matter, since gdb only cares about whether the expression changed and not whether it was written. I realise now their functioning is more software-like (and even inconsistent with respect to awatch, which you'd think would be the union of watch and rwatch). Thanks for the clarification. -- Orjan Friberg Axis Communications AB