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.

Controlling Execution3.2 Defining execution context<strong>RealView</strong> <strong>Debugger</strong> enables you to define the current execution context, and to changethis if required. You do this using:• Code views• Defining scope and context.3.2.1 Code viewsUse the File Editor pane to view source code during your debugging session. In theexample shown in Figure 2-3 on page 2-10, the File Editor pane contains three tabs:• the Dsm tab enables you to track program execution in the disassembly-levelview• the Src tab enables you to track program execution in the source-level view• the file tab dhry_1.c shows the name of the current source file in the editing, ornon-execution, view.Click on the relevant tab to toggle between the different code views.The Src tab acts like a button to display the current source if it is available. If the sourceis not available, <strong>RealView</strong> <strong>Debugger</strong> displays a No source message in the Src tabwindow.If you click on a tab, for example the Src tab, the source file containing the currentcontext is displayed. If the source file is not currently open, <strong>RealView</strong> <strong>Debugger</strong> opensthe file. If the statement where the PC is located is in view, a red box is drawn aroundthat statement to highlight it in the code view.3.2.2 Defining scope and context<strong>RealView</strong> <strong>Debugger</strong> uses scope to determine the value of a symbol. Scope shows how<strong>RealView</strong> <strong>Debugger</strong> accesses variables and finds symbols in expressions. The scopedetermines the execution context and defines how local variables are accessed. Anysymbol value available to a C or C++ program at the current PC is also available to<strong>RealView</strong> <strong>Debugger</strong>.When your program is executing, the PC stores the address of the current executionpoint. By default, the scope is set when the PC changes. Loading an image sets the PCat the entry point using autoscope, that is the PC defines the scope. Autoscope is alsoused in an assembly language routine when you step into code that has no sourceinformation. In this case, <strong>RealView</strong> <strong>Debugger</strong> shows the last calling function that hadvalid source in the Src tab.<strong>ARM</strong> DUI 0153G Copyright © 2002-2005 <strong>ARM</strong> Limited. All rights reserved. 3-3

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

Saved successfully!

Ooh no, something went wrong!