13.07.2015 Views

RealView Debugger User Guide - ARM Information Center

RealView Debugger User Guide - ARM Information Center

RealView Debugger User Guide - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Working with Debug Views6.3 Working with the stackThe stack, or run-time stack, is an area of memory used to store function returninformation and local variables.Executing a function sets up the stack. As the new function is called, a record is createdon the stack including traceback details, and local variables. At this point thesearguments and local variables become available to <strong>RealView</strong> <strong>Debugger</strong>, and you canaccess them through the Code window.When the function returns, the area of the stack occupied by that function is recoveredautomatically and can then be used for the next function call.In a typical memory-managed <strong>ARM</strong> processor, the memory model comprises:• a large area of application memory starting at the lowest address (code and staticdata)• an area of memory used to satisfy program requests, the heap, that grows upwardsfrom the top of the application space• a dynamic area of memory for the stack which grows downwards from the top ofmemory.The Stack Pointer (SP) points to the bottom of the stack.NoteModifying a value in the stack might cause the application program to performincorrectly or even to abort operation completely.<strong>RealView</strong> <strong>Debugger</strong> can provide the calling sequence of any functions that are still inthe execution path because their calling addresses are still on the stack. However, whenthe function is off the stack, it is lost to <strong>RealView</strong> <strong>Debugger</strong>. Similarly, if the stackcontains a function for which there is no debug information, <strong>RealView</strong> <strong>Debugger</strong> mightnot be able to trace back past it.This section describes ways of working with the stack:• Using the Stack pane on page 6-31• Formatting options on page 6-32• Operating on stack contents on page 6-33• Context controls on page 6-34• Setting a breakpoint on page 6-34• Interactive operations on page 6-35.6-30 Copyright © 2002-2005 <strong>ARM</strong> Limited. All rights reserved. <strong>ARM</strong> DUI 0153G

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!