TotalView User Guide : Part V: Debugging : Evaluating Expressions : Using Built-in Variables and Statements : Using TotalView Variables

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 thread ID assigned by the operating system. 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 eval point 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.

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com