This is the mail archive of the gdb-patches@sourceware.cygnus.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]

awatch and rwatch vs watch



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.

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