| |||
| Home > Examining the Target Execution Environment > Displaying information for a variable > Printing the value of a variable | |||
To print the value of a variable:
Select Symbols from the View menu to display the Symbols view. Figure 13.12 shows an example. If you have loaded multiple images to the target, then all the images are listed.
Click the Variables tab. This lists the public and static variables in the image. Figure 13.13 shows an example:
Locate the required variable.
Right-click on the variable entry to display the context menu.
Select the required option from the context menu:
select Print Hex, to display the value of the variable in hexadecimal
select Print Decimal, to display the value of the variable in decimal.
The information is displayed in the Cmd tab.
These options issue a PRINT command, which is the short form of PRINTVALUE.
For example, for the array Arr_2_Glob in
the Dhrystone image, the following information is displayed in the Cmd tab:
for values in hexadecimal:
> print /h @dhrystone\\Arr_2_Glob
0x0000DD40 = {{0x0 <repeats 50 times>} <repeats 8 times>,{0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0xA,0x0 <repeats 42 times>},
{0x0 <repeats 50 times>} <repeats 41 times>}
for values in decimal:
> print @dhrystone\\Arr_2_Glob
0x0000DD40 = {{0 <repeats 50 times>} <repeats 8 times>,{0,0,0,0,0,0,0,
10,0 <repeats 42 times>},{0 <repeats 50 times>} <repeats 41 times>}
the following in the RealView Debugger Command Line Reference Guide:
Alphabetical command reference for details of the PRINTVALUE command.