Following is the rules for input to each panel and dialog box.
Character sets that are allowed to input are as follows:
Table 2.27 | List of Character Set |
|
|
ASCII
|
1- byte alphabets, numbers, symbols.
|
Shift-JIS
|
2-byte alphabet, number, symbol, Hiragana, Katakana, Kanji and 1-byte Katakana.
|
EUC-JP
|
2-byte alphabet, number, symbol, Hiragana, Katakana, Kanji and 1-byte Katakana.
|
UTF-8
|
2-byte alphabet, number, symbol, Hiragana, Katakana, Kanji (include Chinese characters) and 1-byte Katakana.
|
UTF-16 (Unicode)
|
2-byte alphabet, number, symbol, Hiragana, Katakana, Kanji (include Chinese characters) and 1-byte Katakana.
|
Escape sequences that are allowed to input are as follows:
Table 2.28 | Escape Sequence List |
|
|
|
\0
|
0x00
|
null character
|
\a
|
0x07
|
Alert
|
\b
|
0x08
|
Backspace
|
\t
|
0x09
|
Horizontal tab
|
\n
|
0x0A
|
New line
|
\v
|
0x0B
|
Vertical tab
|
\f
|
0x0C
|
Form feed
|
\r
|
0x0D
|
Carriage return
|
\"
|
0x22
|
Double-quotation mark
|
\'
|
0x27
|
Single-quotation mark
|
\?
|
0x3F
|
Question mark
handled as a question mark if ? is entered.
|
\\
|
0x5C
|
Backslash
|
Notations allowed when entering numbers are as follows:
|
|
Binary number
|
Starts with 0b and continues with the numbers from 0 to 1.
(Case insensitive for alphabets)
|
Octal number
|
Starts with 0 and continues with the numbers from 0 to 7.
|
Decimal number
|
Starts without 0 and continues with the numbers from 0 to 9.
|
Hexadecimal number
|
Starts with 0x and continues with the numbers from 0 to 9 and alphabets a to f.
(Case insensitive for alphabets)
In the input area with the
mark, prefix 0x is not needed.
|
(4) | Expression and operator |
Expression represents constants, CPU register name, I/O register name and symbols and those connected with operators.
An expression comes in two types: an address expression and a watch-expression. The expression that requires the address of a symbol is referred to as an address expression, and the one that requires the value of a symbol is referred to as a watch-expression.
(a) | An address expression and operators |
With an address expression, the address of a symbol is used to perform operations. Only when a CPU register name is written, the value of the symbol is used to perform operations.
The basic input formats of address expressions are as follows:
Table 2.30 | Basic Input Format of Address Expressions |
|
|
C/C++ variable name Note 1 No 2
|
Address of a C/C++ variable
|
Expression [ExpressionNote 3]
|
Address of an array
|
Expression.Member nameNote 4
|
Address of a structure/union/class member
|
Expression->Member nameNote 4
|
Address of a structure/union/class member that is pointed to
|
Watch-expression.*Cast expression
|
Address of the pointer to a member variable
|
Watch-expression->*Cast expression
|
Address of the pointer to a member variable
|
CPU register name
|
Value of a CPU register
|
I/O register name
|
Address of an I/O register
|
Label nameNote 5, EQU symbol nameNote 5, [immediate value]
|
Address of a label, a value of an EQU symbol, and an immediate address
|
Integer constant
|
Address
|
Note 1. | It represents C89, C99 and C++ variables. |
Note 2. | If the register is assigned the value of a C variable, an error results. |
Note 3. | The expression that is input as an index to an array is parsed as a watch-expression. |
Note 4. | To specify a member variable of base class, specify scope before a member name.
(Example: variable.BaseClass::member) |
Note 5. | If a label name or EQU symbol name contains a "$," enclose the name in braces "{ }."
(Example: {$Label})
When you specify the CPU register name "I", add ":REG" (e.g. I:REG) to distinguish it from the keyword "I" that indicates an imaginary number. |
From "Table 2.30 Basic Input Format of Address Expressions", the following address expressions with operator can be constructed.
Table 2.31 | Construction of Address Expressions with Operators |
|
|
(Expression)
|
Specifies the order in which operations are performed
|
-Expression
|
Inverts sign
|
!Expression
|
Logical negation
|
~Expression
|
Bit inversion
|
Expression * ExpressionNote
|
Multiplication
|
Expression / ExpressionNote
|
Division
|
Expression % ExpressionNote
|
Remainder calculation
|
Expression + ExpressionNote
|
Addition
|
Expression - ExpressionNote
|
Subtraction
|
Expression & ExpressionNote
|
Bit-wise logical AND
|
Expression ^ ExpressionNote
|
Bit-wise logical exclusive OR
|
Expression | ExpressionNote
|
Bit-wise logical (inclusive) OR
|
Note | Variables and functions can be combined by an operator only with variables, functions and integer constants. (Example: C variable name + I/O register name) |
(b) | Watch-expression and operator |
With watch-expression, the value of a symbol is used to perform operations. Only when the value does not exist, the address of the symbol is used to perform operations. (Example: main( ) + 1)
The basic input formats of watch-expressions are as follows:
Table 2.32 | Basic Input Format of Watch-expressions |
|
|
C/C++ variable nameNote 1
|
Value of a C/C++ variable
|
Expression[Expression]
|
Element values of an array
|
Expression.Member nameNote 2
|
Member values of a structure/union/class
|
Expression->Member nameNote 2
|
Member values of the structure/union/class pointed to by a pointer
|
Watch-expression.*Cast expression
|
Value of a pointer to member variable
|
Watch-expression->*Cast expression
|
Value of a pointer to member variable
|
*Expression
|
Value of pointer variable
|
&Expression
|
Location address
|
CPU register name
|
Value of a CPU register
|
I/O register name
|
Value of an I/O register
|
Label nameNote 3, EQU symbol nameNote 3, [immediate value]
|
Value of a label, value of an EQU symbol, value of an immediate address
|
Integer constant
|
Constant value of an integer
|
Floating constant
|
Constant value of a floating point
|
Character constant
|
Constant value of a character
|
Note 1. | It represents C89, C99 and C++ variables. |
Note 2. | To specify a member variable of base class, specify scope before a member name.
(Example: variable.BaseClass::member) |
Note 3. | If a label name or EQU symbol name contains a "$," enclose the name in braces "{ }."
(Example: {$Label})
Any imaginary number must be multiplied by an uppercase "I" (e.g. 1.0 + 2.0*I). When you specify the CPU register name "I", add ":REG" (e.g. I:REG) to distinguish it from the keyword "I" that indicates an imaginary number. |
From "Table 2.32 Basic Input Format of Watch-expressions", the following watch-expressions with operator can be constructed. For the operators listed in the table below, the expression is parsed according to C language specifications.
Table 2.33 | Construction of Watch-expressions with Operators |
|
|
(Expression)
|
Specifies the order in which operations are performed
|
!Expression
|
Logical negation
|
~Expression
|
Bit inversion
|
Expression * ExpressionNote
|
Multiplication
|
Expression / ExpressionNote
|
Division
|
Expression % ExpressionNote
|
Remainder calculation
|
Expression + ExpressionNote
|
Addition
|
Expression - ExpressionNote
|
Subtraction
|
Expression & ExpressionNote
|
Bit-wise logical AND
|
Expression ^ ExpressionNote
|
Bit-wise logical exclusive OR
|
Expression | ExpressionNote
|
Bit-wise logical (inclusive) OR
|
Note | Variables and functions can be combined by an operator only with variables, functions and integer constants. (Example: C variable name + I/O register name) |
Caution 1. | When two or more variables are defined with the same name in unnamed name spaces of different source files, the Watch panel only shows the information on the first variable to be found. |
Caution 2. | After the member-variable pointer "mp1" defined in the program below is registered with the Watch panel and Local Variables panel, the type of the pointer is indicated as "int *", not "int Foo::*". |
class Foo {
int m1;
};
int Foo::*mp1 = &Foo::m1;
|
Caution 3. | When a char-type one-dimensional array is assigned to multiple locations in registers or memory as shown below, no character string will be displayed in the value column of the Watch panel or Local Variables panel even after the array "array" has been registered with the panel.
char array[5] = "ABCD"; |
Caution 4. | When the selection for [Scope] in the Local Variables panel is not [Current], the values of variables assigned to registers are not displayed correctly. Editing these values is also not possible. |
Caution 5. | When a defined variable satisfies both of the conditions given below, the Watch panel and Local Variables panel indicate the location of the entire variable rather than the location of its member variables. |
[Conditions]
<1> | The variable is assigned to two or more addresses or registers (i.e. two or more addresses or registers are displayed in the address column). |
<2> | A structure-, class-, array-, or union-type member is defined in the variable. |
[Example]
struct Mem {
long m_base;
};
struct Sample {
long m_a;
struct Mem m_b; <- Condition <2>
};
main () {
struct Sample obj;
}
|
Display in the Watch and Local Variables panels:
"obj" - { R1:REG, R2:REG } (struct Sample)
L m_a 0x00000000 { R1:REG } (long)
L m_b - { R1:REG, R2:REG } (struct Base)
L m_base 0x00000000 { R2:REG } (long)
|
Caution 6. | When a variable is cast to another type in the Watch panel, casting of the variable is C-style.
For this reason, the result of casting a class using virtual inheritance to its base class is not the same as the result of the cast within the program. |
class AAA [
int m_aaa;
} objA;
class BBB : public AAA { //BBB inherits AAA.
int m_bbb;
} objB;
class CCC { //CCC does not inherit AAA.
int m_ccc;
} objC
class AAA* pa = objA;
class BBB* pb = objB;
class CCC* pc = objC;
"(AAA*)pa" Usable
"(BBB*)pb" Usable
"(AAA*)pb" Usable
"(CCC*)pc" Usable
"(AAA*)pc" Not usable because pc is considered to point to the top address of AAA.
Image of the cast in a program: (AAA*)((void*)pc)
|
Caution 7. | In case of a variable with the size beyond 0x10000, Value, Style and Address indicate "?" in the Watch panel. |