Executing to the Completion of a Function

You can step your program out of a function call. To finish executing the current function in a thread, select one of the eight Out commands. These commands are located on the Group, Process, and Thread pulldowns.

If the source line that is the goal of the Out operation has more than one statement, TotalView will stop you just after the routine from which just emerged. This allows you to step into the next routine on the line.

When one of these command completes, the primary thread is left stopped at the instruction after the one that called the function.

You can also return out of several functions at once, by selecting a nested stack frame in the Stack Trace Pane and then issuing an Out command.

TotalView executes the primary thread until it returns to the function in the selected frame.

If your program calls recursive functions or mutually recursive functions, you can select a nested stack frame in the Stack Trace Pane to tailor completion of the function even more. In this situation, TotalView uses the frame pointer (FP) of the selected stack frame and the selected source line or instruction to determine when to stop execution. When your program reaches the selected line, TotalView compares the value of the selected FP with the value of the current FP:

  • If the value of the current FP is deeper (more deeply nested) than the value of the selected FP, TotalView continues executing your program.
     
  • If the value of the current FP is equal or shallower (less deeply nested) than the value of the selected FP, TotalView stops your program.
 
 
 
 
support@etnus.com
Copyright © 2001, Etnus, LLC. All rights reserved.
Version 5.0