Using TotalView Variables
TotalView variables that let you access special thread and process values. All variables are 32-bit integers, which is an int or a long on most platforms. The following table describes built-in variables:
The cluster ID. (Interpreted expressions only.)
The TotalView-assigned Debugger Unique ID (DUID). (Interpreted expressions only.)
The value just assigned to a watched memory location. (Watchpoints only.)
The node ID. (Interpreted expressions only.)
The value that existed in a watched memory location before a new value modified it. (Watchpoints only.)
The process ID.
The DUID (debugger ID) of the process. (Interpreted expressions only.)
The thread ID assigned by the operating system. When this is referenced from a process, TotalView throws an error.
The thread ID assigned by TotalView. When this is referenced from a process, TotalView throws an error.
The built-in variables let you create thread-specific breakpoints from the expression system. For example, the $tid variable and the $stop built-in function let you create a thread-specific breakpoint, as the following code shows:
if ($tid == 3)
This tells TotalView to stop the process only when the third thread evaluates the expression.
You can also create complex expressions using these variables; for example:
if ($pid != 34 && $tid > 7)
printf (“Hello from %d.%d\n”, $pid, $tid);
Using any of the following variables means that the evalpoint is interpreted instead of compiled: $clid, $duid, $nid, $processduid, $systid, $tid, and $visualize. In addition, $pid forces interpretation on AIX.
You can’t assign a value to a built-in variable or obtain its address.