This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
awatch and rwatch vs watch
- To: gdb-patches@sourceware.cygnus.com
- Subject: awatch and rwatch vs watch
- From: Eli Zaretskii <eliz@delorie.com>
- Date: Sun, 11 Jul 1999 04:46:23 -0400 (EDT)
- CC: DJ Delorie <dj@delorie.com>, Jim Blandy <jimb@cygnus.com>, Stan Shebs <shebs@cygnus.com>
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.