Defining Evaluation Points

TotalView lets you define evaluation points. These are action points at which you have added a code fragment that TotalView will execute. You can write the code fragment in C, Fortran, or assembler.

Note:   Assembler support is currently available on the Compaq Tru64 UNIX, IBM AIX, and SGI IRIX operating systems. Compiled expressions must be enabled to use assembler constructs.

Here are some of the ways you can use evaluation points:

  • A fragment can also include instructions that stop a process and its relatives. If the code fragment can make a decision whether it should stop execution, it is called a conditional breakpoint.
     
  • You can also use evaluation points to test potential fixes for your program.
     
  • You can set values of your program's variables.
     
  • You can automatically send data to the Visualizer. This can produce animated displays of the changes in your program's data.

You can set an evaluation point at any source line that generates executable code (marked with a boxed line number in the tag field). You can also define evaluation points on machine-level instructions. Stated in a different way, if you can set a breakpoint, you can change it into an evaluation point.

At each evaluation point, the code fragment in the evaluation point is executed before the code on that line. Typically, your program will then execute the program instruction at which you had set the evaluation point. But your code fragment can modify this behavior:

  • It can include a branching instruction (such as goto in C or Fortran). The instruction can transfer control to a different point in the target program, enabling you to test program patches.
     
  • It can contain an intrinsic statement. These special TotalView statements let you stop execution, create barriers, and countdown breakpoints.

TotalView evaluates code fragments in the context of the target program. This means that you can refer to program variables and branch to places in your program.

For complete information on what you can include in code fragments, refer to Writing Code Fragments.

Evaluation points only modify the processes being debugged--they do not modify the source program or create a permanent patch in the executable. If you save a program's evaluation points, however, TotalView reapplies them whenever you start a debugging session for that program. To save your evaluation points, refer to Saving Action Points to a File.

Note:   You should stop a process before setting an evaluation point. This ensures that the evaluation point is set in a stable context in the program.

 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0