This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: read watchpoints ignored?
On Monday 14 November 2005 16:16, Johan Rydberg wrote:
> Daniel Jacobowitz wrote:
> > I thought this was fairly straightforward, so I didn't go into detail.
> > Certainly there's no reason to disable rwatch. Conditionalize "skip
> > this watchpoint if the value has changed" on "this is really an access
> > watchpoint because the target does not support read watchpoints".
> >
> > It should be trivial to fix if you had a platform with read watchpoints
> > handy. Which I don't easily.
>
> I happen to have access to a target that supports true read watchpoints,
> and the following patch seems to do the trick, at least for the testcase
> that Vladimir provided.
This essentially disables read watchpoints. What's the point in first
implementing read watchpoints in a target, and then disabling them completely
in gdb? Should be then disallow "read watchpoint" packet in the remote
protocol?
I don't yet have specific *real-world* examples, but using "is the value
different from the value last time we stopped" as a heuristic to decide if we
hit write watchpoint or read watchpoint seems fragile.
- Volodya