This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Display of read/access watchpoints when HAVE_NONSTEPPABLE_WATCHPOINT


> Date: Thu, 15 Apr 2004 15:23:59 +0200
> From: Orjan Friberg <orjan.friberg@axis.com>
> 
> 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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]