| |||
| Home > Getting Started with RealView Developer Kit > Basic debugging tasks with RealView Debugger > Displaying variables | |||
To display the value of a variable from your source code:
Connect to your debug target, if it is not already connected (see Connecting to your target).
Load the dhrystone.axf image as described in Loading an image ready for debugging. The source file dhry_1.c is
loaded into the File Editor pane. If line numbers are not visible
for your source, display them as described in Displaying line numbers.
Click the Go button on the toolbar to execute the image.
Enter the require number of runs, for example 50000.
Select the required variable in the current context,
for example click on the file tab for the source file dhry_1.c and
move to line 301. Highlight the variable Ptr_Glob in
the expression:
structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
Right-click to display the Source Variable Name menu, shown in Figure 4.1.
Select Print to view the value of the chosen variable in the current context. This is displayed in the Cmd tab of the Output pane.
Select View Memory At Value to display the memory view at this location.