Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015
 
 

Stepping Through a Program

dbx supports two basic single-step commands: next and step , plus two variants of the step command, called step up and step to. Both the next command and the step command execute one source line before stopping again.

If the line executed contains a function call, the next command allows the call to be executed and stops at the following line (“steps over” the call). The step command stops at the first line in a called function (“steps into” the call).

The step up command returns the program to the caller function after you have stepped into a function.

The step to command attempts to step into a specified function in the current source line, or if no function is specified, into the last function called as determined by the assembly code for the current source line. The function call might not occur due to a conditional branch, or no function might be called in the current source line. In these cases, step to steps over the current source line.

For more information on the next and step commands, see next Command and step Command.