awatch and rwatch vs watch
Eli Zaretskii
eliz@delorie.com
Sun Jul 11 01:46:00 GMT 1999
Here's a fragment from watch_command_1:
if (accessflag == 1) bp_type = bp_read_watchpoint;
else if (accessflag == 2) bp_type = bp_access_watchpoint;
else bp_type = bp_hardware_watchpoint;
mem_cnt = can_use_hardware_watchpoint (val);
if (mem_cnt == 0 && bp_type != bp_hardware_watchpoint)
error ("Expression cannot be implemented with read/access watchpoint.");
Why is bp_hardware_watchpoint treated specially here? At least in
the DJGPP version (and I'd expect in other x86-based versions as
well), bp_read_watchpoint and bp_access_watchpoint are implemented
using the same mechanism as bp_hardware_watchpoint, so I don't
understand the cause for the different treatment here.
I'm asking because this happens to cause GDB to fail awatch and rwatch
sometimes where watch succeeds, and I'm trying to debug that.
More information about the Gdb-patches
mailing list