| |||
| Home > RealView Debugger Commands > Alphabetical command reference > CEXPRESSION | |||
Calculates and displays the value of an expression. You can also modify variables using the assignment operator.
[/R] CEXPRESSIONexpression
where:
/RSuppresses printing of the result, that is the line beginning with the text
Result is:
expressionA valid debugger expression:
an expression or symbol name
a source code line number.
The CEXPRESSION command calculates the value of an expression or assigns a value to a variable. You cannot manipulate values larger than 4 bytes, other than double values, in an expression.
The following rules apply to the use of the CEXPRESSION command:
CEXPRESSION runs synchronously if the expression uses target registers, including the stack pointer, or if it uses target memory and background memory access is not available.
Use the WAIT command to force it to run synchronously.
Results are displayed in either floating-point format, address format, or in decimal, hexadecimal, or ASCII format depending on the type of variables used in the expression.
The ASCII representation is displayed if the expression value is a printable ASCII character.
Floating-point numbers are shown as double by default (14 decimal digits of precision). They can be cast to float to display 6 decimal digits of precision.
The following examples show how to use CEXPRESSION:
CEXPRESSION
Run_IndexDisplays the current value
of the variable named Run_Index.
CE /R Run_Index=50Assigns a value of 50 to the
variable named Run_Index, and suppresses the printing
of the result.
CE @R0 =20hWrites 0x20 to target register R0.
CE #146.2Displays
details of the second statement at line 146 in the current source file.
For example, for the dhry_1.c source file of
the dhrystone image this command prints:
Result is: code address 0x00008318 @dhrystone\\DHRY_1\main Line 146..146 column 7..21 at 0x00008318..0x0000831B