2.3.26. CEXPRESSION

Calculates and displays the value of an expression. You can also modify variables using the assignment operator.

Syntax

CEXPRESSION [/R] expression

where:

/R

Suppresses printing of the result, that is the line beginning with the text

Result is:

expression

A valid debugger expression:

  • an expression or symbol name

  • a source code line number.

Description

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.

Rules for the CEXPRESSION command

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.

Examples

The following examples show how to use CEXPRESSION:

CEXPRESSION Run_Index

Displays the current value of the variable named Run_Index.

CE /R Run_Index=50

Assigns a value of 50 to the variable named Run_Index, and suppresses the printing of the result.

CE @R0 =20h

Writes 0x20 to target register R0.

CE #146.2

Displays 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

See also

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0175N
Non-ConfidentialID052111