TotalView User Guide : Part V: Debugging : Setting Action Points : Defining Eval Points and Conditional Breakpoints

Defining Eval Points and Conditional Breakpoints
TotalView lets you define eval points. These are action points at which you have added a code fragment that TotalView executes. You can write the code fragment in C, Fortran, or assembler.
*
Assembler support is currently available on the IBM AIX operating systems. You can enable or disable TotalView’s ability to compile eval points.
*
When running on many AIX systems, you can speed up the performance of compiled expressions by using the –use_aix_fast_trap command when you start TotalView. For more information, see the TotalView Release Notes, available from the Rogue Wave web site. Search for “fast trap”.
Topics in this section are:
*
*
*
*
*
You can do the following when you use eval points:
*
Include instructions that stop a process and its relatives. If the code fragment can make a decision whether to stop execution, it is called a conditional breakpoint.
*
*
*
You can set an eval point at any source line that generates executable code (marked with a box surrounding a line number) or a line that contains assembler-level instructions. This means that if you can set a breakpoint, you can set an eval point.
At each eval point, TotalView or your program executes the code contained in the eval point before your program executes the code on that line. Although your program can then go on to execute this source line or instruction, it can do the following instead:
*
Include a goto in C or Fortran that transfers control to a line number in your program. This lets you test program patches.
*
Execute a TotalView function. These functions let you stop execution, create barriers, and countdown breakpoints. For more information on these statements, see Using Built-in Variables and Statements”.
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.
*
If you call a function from an eval point and there’s a breakpoint within that function, TotalView will stop execution at that point. Similarly, if there’s an eval point in the function, TotalView also evaluates that eval point.
For information on what you can include in code fragments, refer to Using Programming Language Elements”.
Eval points only modify the processes being debugged—they do not modify your source program or create a permanent patch in the executable. If you save a program’s action points, however, TotalView reapplies the eval point whenever you start a debugging session for that program. For information about how to save your eval points, see Saving Action Points to a File”.
*

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