This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Hardware watchpoints; dealing with false triggers?
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 04 Dec 2001 14:51:08 +0100
- Subject: Re: Hardware watchpoints; dealing with false triggers?
- Organization: Axis Communications AB
- References: <Pine.SUN.3.91.1011204133402.27224C-100000@is>
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