f3f
Expressions
GDB now supports array constants in expressions input by the user. The syntax
is
Note:
In this section, we discuss operators that you can use in GDB expressions
regardless of your programming language.
Casts are supported in all languages, not just in C, because it is so useful
to cast a number into a pointer in order to examine a structure at that address
in memory.
GDB supports these operators, in addition to those common to programming
languages:
Because C is so widespread, most of the expressions shown in examples in this
manual are in C. See
‘@’ is a binary operator for treating parts of memory as arrays. See Artificial arrays for more information.
‘::’ allows you to specify a variable in terms of the file or function where it
is defined. See Program variables.
Refers to an object of type, type, stored at address, addr, in memory. addr may be any expression whose value is an integer or pointer (but parentheses
are required around binary operators, just as in a cast). This construct is
allowed regardless of what kind of data is normally supposed to reside at addr.