13.1.5. The Stack

The stack, or run-time stack, is an area of memory used to store function return information and local variables. As each function is called, a record is created on the stack. The record includes traceback details and any local variables. At this point these arguments and local variables become available to RealView Debugger, and you can access them through the Code window.

When the function returns, the area of the stack occupied by that function is made available for the next function call.

In a typical memory-managed ARM processor, the memory map contains the following regions:

You can view the stack with the Stack view, which enables you to:

The Stack Pointer (SP) points to the bottom of the stack.

RealView Debugger can display the calling sequence of any functions that are still in the execution path because their calling addresses are still on the stack. However:

See also

  • Viewing the Stack

  • ARM® Compiler toolchain Using the Assembler

  • ARM® Compiler toolchain Using ARM® C and C++ Libraries and Floating-Point Support

  • ARM® Compiler toolchain Using the Compiler

  • ARM® Compiler toolchain Compiler Reference.

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