ILE C/C++ Programmer's Guide
Use a watch condition to monitor changes in the current value of a
variable or an expression which determines the address of a storage
location. Setting watch conditions is similar to setting conditional
breakpoints, with one important difference:
- Watch conditions stop the program as soon as the value of a variable
changes from its current value.
- Conditional breakpoints stop the program only if the condition
stated in the associated expression is satisfied when the statement is
executed.
The debugger watches a variable through the content of a storage
address, computed at the time the watch condition is set. When the
content at the storage address is changed from the value it had when the watch
condition was set or when the last watch condition occurred, a breakpoint is
set, and the program stops.
- Note:
- After a watch condition has been registered, the new content at the watched
storage location is saved as the new current value of the corresponding
variable. The next watch condition will be registered if the new
content at the watched storage location changes subsequently.
This chapter describes:
- Characteristics of watches
- How to set and remove watch conditions
- An example of setting a watch condition on a variable
- How to display active watches
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.