13.15.1. Examining the Call Stack

To examine the Call Stack:

  1. Select Call Stack from the View menu to display the Call Stack view. Figure 13.46 shows an example.

    Figure 13.46. Call Stack view

    Call Stack view

Multistatement lines in the Call Stack

If an entry is part of a multistatement line, the Call Stack view shows the information in the form of line and column details. Figure 13.47 shows an example.

Figure 13.47. Multistatement details in the Call Stack view

Multistatement details in the Call Stack view

Example

The following procedure shows how you might use the Call Stack view:

  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 dhry_1.c.

  4. Double-click in the gray margin at line 301 of file dhry_1.c. This sets a simple breakpoint.

  5. Click Run to start execution.

  6. Enter 5000 when prompted for the number of runs. Execution stops when the breakpoint at line 301 is reached. The red box marks the location of the PC when execution stops.

  7. Select Call Stack from the View menu to display the Call Stack view. Figure 13.48 shows an example.

    Figure 13.48. Multistatement details in the Call Stack view

    Multistatement details in the Call Stack view

  8. Continue to step through your program.

  9. Monitor changes in the Call Stack view as you step through your program.

  10. Double-click on the red marker disc at line 301 of file dhry_1.c. This clears the breakpoint.

See also

Copyright © 2002-2009 ARM Limited. All rights reserved.ARM DUI 0153K
Non-Confidential