Next: Variables Prev: Program Structure Up: Top
The `c' symbol descriptor indicates that this stab represents a
constant. This symbol descriptor is an exception to the general rule
that symbol descriptors are followed by type information. Instead, it
is followed by `=' and one of the following:
Boolean constant. VALUE is a numeric value; I assume it is 0 for
false or 1 for true.
Character constant. VALUE is the numeric value of the constant.
`e TYPE-INFORMATION , VALUE'
Constant whose value can be represented as integral.
tYPE-INFORMATION is the type of the constant, as it would appear
after a symbol descriptor (Note: String Field.). VALUE is the
numeric value of the constant. GDB 4.9 does not actually get the
right value if VALUE does not fit in a host `int', but it does not
do anything violent, and future debuggers could be extended to
accept integers of any size (whether unsigned or not). This
constant type is usually documented as being only for enumeration
constants, but GDB has never imposed that restriction; I don't
know about other debuggers.
Integer constant. VALUE is the numeric value. The type is some
sort of generic integer type (for GDB, a host `int'); to specify
the type explicitly, use `e' instead.
Real constant. VALUE is the real value, which can be `INF'
(optionally preceded by a sign) for infinity, `QNAN' for a quiet
NaN (not-a-number), or `SNAN' for a signalling NaN. If it is a
normal number the format is that accepted by the C library function
String constant. STRING is a string enclosed in either `'' (in
which case `'' characters within the string are represented as
`\'' or `"' (in which case `"' characters within the string are
represented as `\"').
`S TYPE-INFORMATION , ELEMENTS , BITS , PATTERN'
Set constant. TYPE-INFORMATION is the type of the constant, as it
would appear after a symbol descriptor (Note: String Field.).
eLEMENTS is the number of elements in the set (does this means how
many bits of PATTERN are actually used, which would be redundant
with the type, or perhaps the number of bits set in PATTERN? I
don't get it), BITS is the number of bits in the constant (meaning
it specifies the length of PATTERN, I think), and PATTERN is a
hexadecimal representation of the set. AIX documentation refers
to a limit of 32 bytes, but I see no reason why this limit should
exist. This form could probably be used for arbitrary constants,
not just sets; the only catch is that PATTERN should be understood
to be target, not host, byte order and format.
The boolean, character, string, and set constants are not supported
by GDB 4.9, but it ignores them. GDB 4.8 and earlier gave an error
message and refused to read symbols from the file containing the
The above information is followed by `;'.
automatically generated by info2www