Go to main content
Oracle® Developer Studio 12.5: Debugging a Program with dbx

Exit Print View

Updated: June 2016
 
 

step Command

The step command steps one source line or statement, stepping into calls that were compiled with the -g option.

The dbx step_events environment variable controls whether breakpoints are enabled during a step.

The dbx step_granularity environment variable controls granularity of source line stepping.

The dbx step_abflow environment variable controls whether dbx stops when it detects that abnormal control flow change is about to occur. This type of control flow change can be caused by a call to siglongjmp() or longjmp() or an exception throw.

Native Mode Syntax

step

Single-step one line (step into calls). With multithreaded programs when a function call is stepped over, all threads are implicitly resumed for the duration of that function call in order to avoid deadlock. Non-active threads cannot be stepped.

step n

Single-step n lines (step into calls).

step up

Step up and out of the current function.

step ... -sig signal

Deliver the specified signal while stepping. If a signal handler exists for the signal, step into it if the signal handler was compiled with the -g option.

step ...thread-ID

Step the specified thread. Does not apply to step up.

step ...lwp-ID

Step the specified LWP. Does not implicitly resume all LWPs when stepping over a function.

step to [ function ]

Attempts to step into function called from the current source code line. If function is not specified, steps into the last function called, helping to avoid long sequences of step commands and step up commands. Examples of the last function are:

f()->s()-t()->last();

last(a() + b(c()->d()));

where:

n is the number of lines to step.

signal is the name of a signal.

thread-ID is a thread ID.

lip-ID is an LWP ID.

function is a function name.

When an explicit lwpID is specified, the deadlock avoidance measure of the generic step command is defeated.

When executing the step to command, while an attempt is made to step into the last assembly call instruction or step into a function (if specified) in the current source code line, the call might not be taken due to a conditional branch. In a case where the call is not taken or no function call is in the current source code line, the step to command steps over the current source code line. Take special consideration on user-defined operators when using the step to command.

See also stepi Command for machine-level stepping.

Java Mode Syntax

step

Single-step one line (step into calls). With multithreaded programs when a method call is stepped over, all threads are implicitly resumed for the duration of that method call in order to avoid deadlock. Non-active threads cannot be stepped.

step n

Single-step n lines (step into calls).

step up

Step up and out of the current method.

step ...thread-ID

Step the specified thread. Does not apply to step up.

step ...lwp-ID

Step the specified LWP. Does not implicitly resume all LWPs when stepping over a method.