TotalView User Guide : Part IV: Advanced Tools, Configuration, and Customization : Group, Process, and Thread Control : Stepping (Part II): Examples
Stepping (Part II): Examples
The following are examples that use the CLI stepping commands:
*Step a single thread
While the thread runs, no other threads run (except kernel manager threads).
Example: dfocus t dstep
*Step a single thread while the process runs
A single thread runs into or through a critical region.
Example: dfocus p dstep
*Step one thread in each process in the group
While one thread in each process in the share group runs to a goal, the rest of the threads run freely.
Example: dfocus g dstep
*Step all worker threads in the process while nonworker threads run
Worker threads run through a parallel region in lockstep.
Example: dfocus pW dstep
*Step all workers in the share group
All processes in the share group participate. The nonworker threads run.
Example: dfocus gW dstep
*Step all threads that are at the same PC as the TOI
TotalView selects threads from one process or the entire share group. This differs from the previous two items in that TotalView uses the set of threads that are in lockstep with the TOI rather than using the workers group.
Example: dfocus L dstep
In the following examples, the default focus is set to d1.<.
dstep
Steps the TOI while running all other threads in the process.
dfocus W dnext
Runs the TOI and all other worker threads in the process to the next statement. Other threads in the process run freely.
dfocus W duntil 37
Runs all worker threads in the process to line 37.
dfocus L dnext
Runs the TOI and all other stopped threads at the same PC to the next statement. Other threads in the process run freely. Threads that encounter a temporary breakpoint in the course of running to the next statement usually join the lockstep group.
dfocus gW duntil 37
Runs all worker threads in the share group to line 37. Other threads in the control group run freely.
UNW 37
Performs the same action as the previous command: runs all worker threads in the share group to line 37. This example uses the predefined UNW alias instead of the individual commands. That is, UNW is an alias for dfocus gW duntil.
SL
Finds all threads in the share group that are at the same PC as the TOI and steps them all in one statement. This command is the built-in alias for dfocus gL dstep.
sl
Finds all threads in the current process that are at the same PC as the TOI, and steps them all in one statement. This command is the built-in alias for dfocus L dstep.
 
RELATED TOPICS 
 
Stepping through your program
Stepping (Part 1)