Sun Studio 12 Update 1: Debugging a Program With dbx

Single Stepping

To single step a specified number of lines of code, use the dbx commands next or step followed by the number of lines [n] of code you want executed.

(dbx) next n


(dbx) step n

The step_granularity environment variable determines the unit by which the step command and next command step through your code (see Setting dbx Environment Variables). The unit can be either statement or line.

The step_events environment variable controls whether breakpoints are enabled during a step (see Setting dbx Environment Variables).

The step_abflow environment variable controls whether dbx stops when it detects that an abnormal control flow change is about to happen (see Setting dbx Environment Variables). Such a control flow change can be caused by a call to siglongjmp() or longjmp() or an exception throw.