Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Constants.html
blobf1461fa12c1c17f451b140e831f2f81d3baab45b
1 <html lang="en">
2 <head>
3 <title>STABS</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="STABS">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Constants">Constants</a>
13 <hr><br>
14 </div>
16 <h2 class="chapter">Constants</h2>
18 <p>The <code>c</code> symbol descriptor indicates that this stab represents a
19 constant. This symbol descriptor is an exception to the general rule
20 that symbol descriptors are followed by type information. Instead, it
21 is followed by <code>=</code> and one of the following:
23 <dl>
24 <dt><code>b </code><var>value</var><code></code>
25 <dd>Boolean constant. <var>value</var> is a numeric value; I assume it is 0 for
26 false or 1 for true.
28 <br><dt><code>c </code><var>value</var><code></code>
29 <dd>Character constant. <var>value</var> is the numeric value of the constant.
31 <br><dt><code>e </code><var>type-information</var><code> , </code><var>value</var><code></code>
32 <dd>Constant whose value can be represented as integral.
33 <var>type-information</var> is the type of the constant, as it would appear
34 after a symbol descriptor (see <a href="String-Field.html#String%20Field">String Field</a>). <var>value</var> is the
35 numeric value of the constant. GDB 4.9 does not actually get the right
36 value if <var>value</var> does not fit in a host <code>int</code>, but it does not
37 do anything violent, and future debuggers could be extended to accept
38 integers of any size (whether unsigned or not). This constant type is
39 usually documented as being only for enumeration constants, but GDB has
40 never imposed that restriction; I don't know about other debuggers.
42 <br><dt><code>i </code><var>value</var><code></code>
43 <dd>Integer constant. <var>value</var> is the numeric value. The type is some
44 sort of generic integer type (for GDB, a host <code>int</code>); to specify
45 the type explicitly, use <code>e</code> instead.
47 <br><dt><code>r </code><var>value</var><code></code>
48 <dd>Real constant. <var>value</var> is the real value, which can be <code>INF</code>
49 (optionally preceded by a sign) for infinity, <code>QNAN</code> for a quiet
50 NaN (not-a-number), or <code>SNAN</code> for a signalling NaN. If it is a
51 normal number the format is that accepted by the C library function
52 <code>atof</code>.
54 <br><dt><code>s </code><var>string</var><code></code>
55 <dd>String constant. <var>string</var> is a string enclosed in either <code>'</code>
56 (in which case <code>'</code> characters within the string are represented as
57 <code>\'</code> or <code>"</code> (in which case <code>"</code> characters within the
58 string are represented as <code>\"</code>).
60 <br><dt><code>S </code><var>type-information</var><code> , </code><var>elements</var><code> , </code><var>bits</var><code> , </code><var>pattern</var><code></code>
61 <dd>Set constant. <var>type-information</var> is the type of the constant, as it
62 would appear after a symbol descriptor (see <a href="String-Field.html#String%20Field">String Field</a>).
63 <var>elements</var> is the number of elements in the set (does this means
64 how many bits of <var>pattern</var> are actually used, which would be
65 redundant with the type, or perhaps the number of bits set in
66 <var>pattern</var>? I don't get it), <var>bits</var> is the number of bits in the
67 constant (meaning it specifies the length of <var>pattern</var>, I think),
68 and <var>pattern</var> is a hexadecimal representation of the set. AIX
69 documentation refers to a limit of 32 bytes, but I see no reason why
70 this limit should exist. This form could probably be used for arbitrary
71 constants, not just sets; the only catch is that <var>pattern</var> should be
72 understood to be target, not host, byte order and format.
73 </dl>
75 <p>The boolean, character, string, and set constants are not supported by
76 GDB 4.9, but it ignores them. GDB 4.8 and earlier gave an error
77 message and refused to read symbols from the file containing the
78 constants.
80 <p>The above information is followed by <code>;</code>.
82 </body></html>