In This Book

Using the step Command

The step command advances target program execution one source code statement at a time. If you supply a numeric argument to the step command (for example, step 5), it will advance execution by the speci￿ed number of source code statements.

If you specify step -instruction , execution advances one assembly instruction. The PC location arrow changes to a broken variant to indicate when the current point of execution is either at another source statement on the same line or at an instruction beyond the statement's ￿rst instruction.

However, you must invoke the Assembly Instructions dialog box to see stepping through assembly instructions. Invoke the Assembly Instructions dialog box from Show:Assembly Instructions .

If the current point of execution is a routine call, step advances execution to the ￿rst executable statement in the called routine. To advance execution without stepping into a routine, use step -over .

If you accidentally step into a routine, use the go -returncommand to advance execution to the statement following the routine call.

The step command also has a -returnoption, but it takes much longer to complete.

By default, the step command do es not step into system or library calls. If you want to step into system or library calls, you can enable the loading of symbol information from the Dynamic Images dialog box. Select Execution:Enable Images/Libraries to invoke it.

Alternatively, use the property libraries command with the appropriate library as an argument if you want to step into system or library calls.

See \Debugging Shared Libraries" in Chapter 8 for information about debugging shared libraries.

2-16 Compiling, Loading, and Executing the Target Program