dstep
Steps lines, stepping into subfunctions
Format:
dstep [ num-steps ]
Arguments:
num-steps
An integer number greater than 0, indicating the number of source lines to be executed.
Description:
The dstep command executes source lines; that is, it advances the program by steps (source lines). If a statement in a source line invokes a subfunction, dstep steps into the function.
The optional num-steps argument tells the CLI how many dstep operations it should perform. If you do not specify num-steps, the default is 1.
The dstep command iterates over the arenas in the focus set by doing a thread-level, process-level, or group-level step in each arena, depending on the width of the arena. The default width is process (p).
If the width is process, the dstep command affects the entire process containing the thread to be stepped. Thus, while only one thread is stepped, all other threads contained in the same process also resume executing. In contrast, the dfocus t dstep command tells the CLI that it should just step the thread of interest.
Note: On systems having identifiable manager threads, the "dfocus t dstep" command allows the manager threads to run as well as the thread of interest.
The action taken on each term in the focus list depends on whether its width is thread, process, or group, and on the group specified in the current focus. (If you do not explicitly specify a group, the default is the control group.)
If some thread hits an action point other than the goal breakpoint during a step operation, that ends the step.
thread width
Only the thread of interest is allowed to run. (This is not supported on all systems.)
process width (default)
The behavior depends on the group specified in the arena.
Process group
TotalView allows the entire process to run, and execution continues until the thread of interest arrives at its goal location. TotalView plants a temporary breakpoint at the goal location while this command executes. If another thread reaches this goal breakpoint first, your program continues to execute until the thread of interest reaches the goal.
Thread group
TotalView runs all threads in the process that are in that group to the same goal as the thread of interest. If a thread arrives at the goal that is not in the group of interest, it also stops there. The group of interest specifies the set of threads for which TotalView will wait. This means that the command does not complete until all threads in the group of interest are at the goal.
group width
The behavior depends on the group specified in the arena.
Process group
TotalView examines that group, and each process having a thread stopped at the same location as the thread of interest is identified. One matching thread from each matching process is selected. TotalView then runs all processes in the group, and waits until the thread of interest arrives at its goal location, and each selected thread also arrives there.
Thread group
The behavior is similar to process width behavior except that all processes in the program control group will run, rather than just the process of interest. Regardless of what threads are in the group of interest, TotalView only waits for threads that are in the same share group as the thread of interest. This is because it is not useful to run threads executing in different images to the same goal.
Command alias:
You may find the following aliases useful:
Alias |
Definition |
Meaning |
s |
{dstep} |
Runs the thread of interest one statement while allowing other threads in the process to run. |
S |
{dfocus g dstep} |
A group stepping command. This searches for threads in the share group that are at the same PC as the thread of interest, and steps one such "aligned" thread in each member one statement. The rest of the control group runs freely. |
sl |
{dfocus L dstep} |
Steps the process threads in "lockstep". This steps the thread of interest one statement, and runs all threads in the process that are at the same PC as the thread of interest to the same statement. Other threads in the process run freely. The group of threads that are at the same PC is called the lockstep group. This alias does not force process width. If the default focus is set to group, this steps the group. |
SL |
{dfocus gL dstep} |
Steps "lockstep" threads in the group. This steps all threads in the share group that are at the same PC as the thread of interest one statement. Other threads in the control group run freely. |
sw |
{dfocus W dstep} |
Steps worker threads in the process. This steps the thread of interest one statement, and runs all worker threads in the process to the same (goal) statement. The nonworker threads in the process run freely. This alias does not force process width. If the default focus is set to group, this steps the group. |
SW |
{dfocus gW dstep} |
Steps worker threads in the group. This steps the thread of interest one statement, and runs all worker threads in the same share group to the same statement. All other threads in the control group run freely. |
Examples:
dstep
Executes the next source line, stepping into any procedure call that is encountered. While only the current thread is stepped, other threads in the process run.
s 15
Executes the next 15 source lines.
f p1.2 dstep
Steps thread 2 in process 1 by one source line. This also resumes execution of all other threads in process 1; they are halted as soon as thread 2 in process 1 executes its statement.
f t1.2 s
Steps thread 2 in process 1 by one source line. No other threads in process 1 execute.