The debugger can evaluate simple expressions that can be displayed in the Watch window or as a tool-tip in the code editor.
The simplest expression is an identifier the debugger tries to interpret in the following order:
Numbers can be used in expressions. Hexadecimal numbers must be prefixed with 0x.
Registers can be referenced by prefixing the register name with @.
The standard C and C++ operators !, ~, *, /, %, +, -, >>, <<, <, <=, >, >=, ==, |, &, ^, &&, and || are supported on numeric types.
The standard assignment operators =, +=, -=, *=, /=, %=, >>, >>=, <<=, &=, |=, ^= are supported on numeric types.
The array subscript operator ‘[]’ is supported on array and pointer types.
The structure access operator ‘.’ is supported on structured types (this also works on pointers to structures), and -> works similarly.
The dereference operator (prefix ‘*’) is supported on pointers, the address-of (prefix ‘&’) and sizeof operators are supported.
The addressof(filename, linenumber) operator will return the address of the specified source code line number.
Function calling with parameters and return results.
Casting to basic pointer types is supported. For example, (unsigned char *)0x300 can be used to display the memory at a given location.
Casting to basic array types is supported. For example, (unsigned char[256])0x100 can be used to reference a memory region.
Arrays can be sliced using ‘[a:b]’ where ‘a’ is the first element and ‘b’ is the last element to display.
Operators have the precedence and associativity one expects of a C-like programming language.