Re: Setting conditional break points

From: Dave Hayden (
Date: Thu Jul 19 2001 - 22:23:30 BST

Sampath Narayan <> writes:
> Is there  a way specifying a break point when a variable is accessed for
> read or write  (irrespective of the function or code line in which it is
> accessed ) ?

You might be able to use a "divide and conquor" approach to the problem.
If a variable is changing to an unexpected value, try putting breakpoints in before and after the change.  Then move the breakpoints closer together until
you've found the spot where the value changes.

As an FYI, without hardware support, this type of breakpoint slows the program
being debugged to a crawl.  That's because the debugger needs to interrupt the program after every instruction (or maybe every statement) to see if the value has changed.

The X86 processors have hardware support that will generate an interrupt when
a specified memory address is modified.  I'm not sure about other processors.


This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:34 GMT