| |||
| Home > ARM Symbolic Debugger > Specifying source-level objects > Expressions | |||
Some debugger commands require expressions as arguments. Their syntax is based on C. A full set of operators is available. The lower the number, the higher the precedence of the operator. These are shown in the following table, in descending order of precedence.
Table 7.3. Precedence of operators
| Precedence | Operator | Purpose | Syntax |
|---|---|---|---|
1 |
| Grouping |
|
| Subscript |
| |
| Record selection |
| |
|
| Indirect selection |
( |
| 2 |
| Logical NOT | !finished |
| Bitwise NOT |
| |
| Unary minus |
| |
| Indirection |
| |
| Address |
| |
3 |
| Multiplication |
|
| Division |
| |
| Integer remainder |
| |
4 |
| Addition |
|
| Subtraction |
| |
5 |
| Right shift |
|
| Left shift |
| |
6 |
| Less than |
|
| Greater than |
| |
| Less than or equal |
| |
| Greater than or equal |
| |
7 |
| Equal |
|
| Not equal |
| |
8 |
| Bitwise AND |
|
9 |
| Bitwise EOR |
|
10 |
| Bitwise OR |
|
11 |
| Logical AND |
|
12 |
| Logical OR |
|
Subscripting can only be applied to pointers and array names. The symbolic debugger checks both the number of subscripts and their bounds, in languages which support such checking. It is inadvisable to use out-of-bound array accesses. As in C, the name of an array may be used without subscripting to yield the address of the first element.
The prefix indirection operator * is used
to de-reference pointer values. If ptr is a pointer, *ptr yields
the object to which it points.
If the left-hand operand of a right shift is a signed variable, the shift is an arithmetic one and the sign bit is preserved. If the operand is unsigned, the shift is a logical one and zero is shifted into the most significant bit.
Expressions must not contain function calls that return non-primitive values.