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:
Name
Returns
$clid
The cluster ID. (Interpreted expressions only.)
$duid
The TotalView-assigned Debugger Unique ID (DUID). (Interpreted expressions only.)
$newval
The value just assigned to a watched memory location. (Watchpoints only.)
$nid
The node ID. (Interpreted expressions only.)
$oldval
The value that existed in a watched memory location before a new value modified it. (Watchpoints only.)
$pid
The process ID.
$processduid
The DUID (debugger ID) of the process. (Interpreted expressions only.)
$systid
The thread ID assigned by the operating system. When this is referenced from a process, TotalView throws an error.
$tid
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)
$stop;
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.