8.4.2. Stepping into functions

To enter called functions when stepping:

  1. Connect to your target.

  2. Load the required image, for example dhrystone.axf.

  3. Click the Locate PC button on the Debug toolbar to view the source file that contains the PC scope (dhry_1.c in this example).

  4. Display line 149.

  5. Double-click on the line number in the left margin to set a breakpoint.

    The following message is displayed in the Output view:

    binstr \DHRY_1\#149:2
    

    Note

    The number following the colon : might be different to that shown. It is the position within the line where the breakpoint is set. This is significant only when setting a breakpoint on multistatement lines.

  6. Click Run.

    The program begins execution.

  7. When prompted for the number of runs, enter 1000.

    The program continues execution and runs up to the breakpoint. A red box shows the location of the PC at line 149.

    The Cmd tab of the Output view shows where execution has stopped, for example:

    Stopped at 0x00008480 due to SW Instruction Breakpoint
    Stopped at 0x00008480: DHRY_1\main Line 149
    
  8. Click the Step by line or instruction into functions button once.

    A red box shows the location of the PC at line 378. The Proc_5 function has been stepped into.

  9. Click Step by line or instruction into functions several times, until you are familiar with the operation of this control.

    The red box moves to the next line of code each time you click the button, even when the line of source comprises several instructions.

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N
Non-ConfidentialID052111