[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-patches
Subject:    awatch and rwatch vs watch
From:       eliz () delorie ! com (Eli Zaretskii)
Date:       1999-07-11 1:46:00
Message-ID: 199907110846.EAA00532 () indy ! delorie ! com
[Download RAW message or body]

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.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic