Related Topics:| Data Change Tracking | Breakpoints in C++ Classes |
| Breakpoints Window |
You can set an On Access breakpoint to stop program execution when the contents of a variable or memory address is either read or written. On Access is a generalized version of On Modify that can detect accesses in the stack or in system calls.
To set an On Access breakpoint:
Breakpoints. Or, choose Execute
Set Breakpoints.
On Access. In the Event text box, type `r' 'to break on read access, 'w' to break on write access, or 'x' to break on execute memory accesses. You can type any combination of these three letters. Then type 'b' to break before the access or ''a' to break after the access. Finally, type the address you want to watch. For example:
rwa &var
wa &var + 40
Note - If you want to watch changes in a variable, be sure to include an ampersand (&) before the variable name. This is required for C and C++.
rb 0x1234, 4
Stop.