7.4.2. Using the Call Stack pane

Use the Call Stack pane to follow the flow of your application through the hierarchical structure by examining the current status of functions and variables. This enables you to see the path that leads from the main entry point to the currently executing function at the top of the stack.

The Call Stack pane shows the:

To use traceback:

  1. Select File → Reload Image to Target to reload the image dhrystone.axf.

  2. Click on the Src tab to view the source file dhry_1.c.

  3. Set a simple breakpoint by double-clicking on line 150.

  4. Click Go to start execution.

  5. Enter 5000 when asked for the number of runs.

    The program starts and then stops when execution reaches the breakpoint at line 150. The red box marks the location of the PC when execution stops.

  6. Select View → Pane Views → Call Stack to view the Call Stack pane, shown in Figure 7.8.

    When you open the Call Stack pane, the first entry is 0x0000AFFC showing the address of the link register when the application starts. This is the default format for all variables in this pane.

  7. Continue to step through your program. If the current line is a multistatement line, for example a For statement, then the Call Stack pane shows the information in the form of line and column details, shown in Figure 7.8.

    Figure 7.8. Multistatement details in the Call Stack pane

    Multistatement details in the Call Stack pane
  8. Monitor changes in the Call Stack pane as you step through your program.

  9. Double-click on the red marker disc to clear the breakpoint at line 150.

Tabs in the Call Stack pane

The Call Stack pane contains the tabs:

Call Stack

Displays details of the functions currently on the stack, shown in Figure 7.8.

Locals

Displays a list of the variables that are local to the current function.

Statics

Displays a list of static variables local to the current module.

This

In C++ the this pointer locates the object for which the member function was called. It is C++ specific.

Using the Pane menu

Click on the Pane menu button to display the Pane menu that contains options to:

  • manage variables

  • change the display format

  • change how contents are updated

  • extract data from the Call Stack pane for use in other panes or windows.

Note

The options accessible from the Pane menu depend on the tab currently displayed.

Click on the Call Stack tab, highlight an entry in the functions list and display the Pane menu options:

Copy

Copy the chosen entry, where enabled.

Timed Update when Running

The Call Stack pane can be updated at a specified time interval during program execution. Select this option to set this timer according to the update period specified below.

This is only available where supported by the underlying debug target.

Timed Update Period

Use this to choose the interval, in seconds, between window updates.

Any value you enter here is only used when the option Timed Update when Running is enabled, that is where supported by the underlying debug target.

Update Window Now

Updates the contents of the Call Stack pane. Use this when Timed Update when Running is enabled, or when Automatic Update is disabled.

Automatic Update

Refreshes the Call Stack pane as soon as a watchpoint is triggered and execution stops. This is enabled by default.

Show char* and char[] as strings

Displays local variables of type char* and char[] (or casted) as strings.

This is enabled by default.

Show integers in hex

Displays all integers in hexadecimal format. Disabling this option displays all integers in decimal. This is enabled by default.

Properties

Displays a text description of the item under the cursor.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential