:: | C++ scope resolution operator. Defined on struct, union, and |
| class types. |
:: | Double colons also represent the GDB scope operator (see |
| “Expressions” (page 83)). Same precedence as ::, above. |
If an operator is redefined in the user code, GDB usually attempts to invoke the redefined version instead of using the original meaning.
9.4.1.2C and C++ constants
GDB allows you to express the constants of C and C++ in the following ways:
•Integer constants are a sequence of digits. Octal constants are specified by a leading '0' (that is zero), and hexadecimal constants by a leading '0x' or '0X'. Constants can also end with a letter 'l', specifying that the constant should be treated as a long value.
•Floating point constants are a sequence of digits, followed by a decimal point, followed by a sequence of digits, and optionally followed by an exponent. An exponent is of the form:
•Enumerated constants consist of enumerated identifiers, or their integral equivalents.
•Character constants are a single character surrounded by single quotes ('), or a number or the ordinal value of the corresponding character (usually its ASCII value). Within quotes, the single character may be represented by a letter or by escape sequences, which are of the form '\nnn', where nnn is the octal representation of the character's ordinal value; or of the form '\x', where 'x' is a predefined special character―for example, '\n' for newline.
•String constants are a sequence of character constants surrounded by double quotes
("). Any valid character constant (as described above) may appear. Double quotes within the string must be preceded by a backslash, so for instance '"a\"b'c"' is a string of five characters.
•Pointer constants are an integral value. You can also write pointers to constants using the C operator '&'.
•Array constants are
108 Using GDB with Different Languages