TotalView Online Help : Process Window : Action Point Menu : Action Point > Properties : Evaluate
Evaluate
When your program encounters an evaluation point, the code you enter is executed. TotalView can either compile or interpret the code you enter here. On some machines, it can only interpret your code. If TotalView can compile your code, it patches the compiled code into your process. If TotalView must interpret your code, TotalView executes this information after your program reaches the evaluation point. In either case, the code executes before the code within the source line executes.
Figure 75: Action Point > Properties Dialog Box
When entering code, indicate which programming language you are using. You can specify C++, C, Fortran, or Assembler.
Chapter 16 of the TotalView Users Guide contains an extensive evaluation points discussion.
Here are some examples of ways to use evaluation points:
Countdown Breakpoints
The following is an example of a C language countdown breakpoint:
static int count = 100;
if (count-- == 0) {
$stop;
count = 100;
}
Conditional Breakpoints
The following is an example of a C language conditional breakpoint:
if (index < 0 || ptr == 0)
$stopall;
Conditional Barriers
The following is an example of a C language conditional barrier point:
if (index < 0 || ptr == 0)
$holdstopall;
In these examples, the $stop, $stopall, and $holdstopall special directives stop a process when a condition is true. For more information, see “Built-In Statements” in the TotalView Users Guide.