Totalview® for HPC User Guide : PART II Debugging Tools and Tasks : Chapter 7 Stepping through and Executing your Program : Using Stepping Commands
Using Stepping Commands
While different programs have different requirements, the most common stepping mode is to set group focus to Control and the target to Process or Group. You can now select stepping commands from the Process or Group menus or use commands in the toolbar.
CLI: dfocus g
dfocus p
Figure 84 illustrates stepping commands.
Figure 84 – Stepping Illustrated
The arrow indicates that the PC is at line 15. The four stepping commands do the following:
Next executes line 15. After stepping, the PC is at line 16.
Step moves into the sub2() function. The PC is at line 21.
Run To executes all lines until the PC reaches the selected line, which is line 23.
Out executes all statements within sub1() and exits from the function. The PC is at line 9. If you now execute a Step command, TotalView steps into sub3().
Remember the following things about single-stepping commands:
To cancel a single-step command, select Group > Halt or Process > Halt.
CLI: dhalt
If your program reaches a breakpoint while stepping over a function, TotalView cancels the operation and your program stops at the breakpoint.
If you enter a source-line stepping command and the primary thread is executing in a function that has no source-line information, TotalView performs an assembler-level stepping command.
When TotalView steps through your code, it steps one line at a time. This means that if you have more than one statement on a line, a step instruction executes all of the instructions on that line.
To modify the way source-level single stepping works, use the dskip command to create and manage single-stepper “skip” rules. You can add rules that match a function, all functions in a source file, or a specific function in a specific source file.
 
RELATED TOPICS 
 
The dfocus command
The dfocus command in "CLI Commands" in the TotalView for HPC Reference Guide
Detailed discussion on stepping
The dskip command
The dskip command in "CLI Commands" in the TotalView for HPC Reference Guide