Modifying Watchpoints
Modify or delete a watchpoint from the Action Points view by right clicking on the watchpoint to bring up the context menu and selecting Properties. This launches the Modify Watchpoint dialog.
In this dialog you can set the following:
*Enabled: If selected, TotalView makes this watchpoint active. (If a watchpoint is inactive, TotalView ignores changes to the watched memory locations.)
*Address: The first (or lowest) memory address to watch. Depending on the platform, this address may need to be aligned to a multiple of the Length in Bytes field. If you edit the address of an existing watchpoint, TotalView alters the watchpoint so it watches this new memory location and reassigns the watchpoint’s action point ID.
*Length in Bytes: The number of bytes that TotalView should watch. Normally, this amount is the size of the variable. However, some architectures limit the amount of memory that can be watched. In other cases, you may want TotalView to monitor a few locations in an array. For information on architectural limitations, see Using Watchpoints on Different Architectures.
*When value changes: The three width selections control how a breakpoint behaves in a multithreaded or multi-process program. Here’s a summary:
*Stop Group: Stop all running threads in all processes in the group. When you first create a watchpoint Stop Group is selected by default.
*Stop Process: Stop all the running threads in the process containing the thread that hit the breakpoint.
*Evaluate Expression: Select this to enter a code fragment in the provided field. The expression is compiled into interpreted code that is executed each time the watchpoint triggers. These points can be used to implement countdown and conditional watchpoints.
If you select Evaluate Expression, you must specify the following:
*Expression field: Enter the code fragment in the expression field.
*Type for $newval/$oldval: If you are placing the value stored at the memory location into a variable (using $newval and $oldval), you must define the variable’s data by using a scalar type, such as int, integer, float, real, or char. You cannot use aggregate types such as arrays and structures.
If the size of the watched location matches the size of the data type entered here, TotalView interprets the $oldval and $newval information as the variable’s type. If you are watching an entire array, the watched location can be larger than the size of this type. For more information about setting the type, see Using Watchpoint Expressions.
*Language: Indicates the programming language in which you wrote the expression.