A symbol name corresponding to a scalar or aggregate identifier, an element of an aggregate, or a dereferenced pointer.
If you are watching a variable, you need to specify only the amount of storage to watch if you want to override the default value.
Specifies the language in which you are writing an expression. The values you can use for
lang are
c,
c++,
f7,
f9, and
asm, for C, C++, FORTRAN 77, Fortran-9x, and assembler, respectively. If you do not use a language code, TotalView picks one based on the variable's type. If you specify only an address, TotalView uses the C language.
When the watchpoint is triggered, evaluates expr in the context of the thread that hit the watchpoint. In most cases, you need to enclose the expression in braces (
{ }).
The data type of $oldval/
$newval in the expression. If you do not use this option, TotalView uses the variable’s datatype. If you specify an address and you also use an expression, you must use this option.
The dwatch command defines a watchpoint on a memory location where the specified variables are stored. The watchpoint triggers whenever the value of the variable changes. The CLI returns the ID of the newly created watchpoint.
The value set in the STOP_ALL variable indicates which processes and threads stop executing.
The watched variable can be a scalar, array, record, or structure object, or a reference to a particular element in an array, record, or structure. It can also be a dereferenced pointer variable.
The dprint command displays an error message if the variable is in a register.
If you do not use the –length option, the CLI uses the length attribute from the program’s symbol table. This means that the watchpoint applies to the data object named; that is, specifying the name of an array lets you watch all elements of the array. Alternatively, you can watch a certain number of bytes, starting at the named location.
The CLI prints a message showing the action point identifier, the location being watched, the current execution location of the triggering thread, and the identifier of the triggering threads.
One possibly confusing aspect of using expressions is that their syntax differs from that of Tcl. This is because you need to embed code written in Fortran, C, or assembler within Tcl commands. In addition, your expressions often include TotalView built-in functions.
For these examples, assume that the current process set at the time of the dwatch command consists only of process 2, and that
ptr is a global variable that is a pointer.
Watches the address stored in pointer ptr at the time the watchpoint is defined, for changes made by process 2. Only process 2 is stopped. The watchpoint location does not change when the value of
ptr changes.
Performs the same action as the previous example. Because the argument to the dwatch command contains a space, Tcl requires you to place the argument within braces.
Watches the address pointed to by ptr in processes 2 and 3. Because this example does not contain either a
–p or
–g option, the value of the
STOP_ALL variable lets the CLI know if it should stop processes or groups.
Watches the address pointed to by ptr in processes 2, 3, and 4. The
–p option indicates that TotalView only stops the process triggering the watchpoint.
Watches 30 bytes of data beginning at the location pointed to by aString. If any of these bytes change, execution control transfers to line 447.
Watches the my_vbl variable and triggers when
0x11ffff38 is stored in it.