|
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1992-2020 Free Software Foundation, Inc.
- Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
- and David MacKenzie.
-
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with no
- Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
- Texts. A copy of the license is included in the section entitled "GNU
- Free Documentation License". -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Constants (STABS)</title>
-
- <meta name="description" content="Constants (STABS)">
- <meta name="keywords" content="Constants (STABS)">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="index.html#Top" rel="up" title="Top">
- <link href="Variables.html#Variables" rel="next" title="Variables">
- <link href="Alternate-Entry-Points.html#Alternate-Entry-Points" rel="prev" title="Alternate Entry Points">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="Constants"></a>
- <div class="header">
- <p>
- Next: <a href="Variables.html#Variables" accesskey="n" rel="next">Variables</a>, Previous: <a href="Program-Structure.html#Program-Structure" accesskey="p" rel="prev">Program Structure</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
- </div>
- <hr>
- <a name="Constants-1"></a>
- <h2 class="chapter">3 Constants</h2>
-
- <p>The ‘<samp>c</samp>’ 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 ‘<samp>=</samp>’ and one of the following:
- </p>
- <dl compact="compact">
- <dt><code>b <var>value</var></code></dt>
- <dd><p>Boolean constant. <var>value</var> is a numeric value; I assume it is 0 for
- false or 1 for true.
- </p>
- </dd>
- <dt><code>c <var>value</var></code></dt>
- <dd><p>Character constant. <var>value</var> is the numeric value of the constant.
- </p>
- </dd>
- <dt><code>e <var>type-information</var> , <var>value</var></code></dt>
- <dd><p>Constant whose value can be represented as integral.
- <var>type-information</var> is the type of the constant, as it would appear
- after a symbol descriptor (see <a href="String-Field.html#String-Field">String Field</a>). <var>value</var> is the
- numeric value of the constant. GDB 4.9 does not actually get the right
- value if <var>value</var> does not fit in a host <code>int</code>, 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.
- </p>
- </dd>
- <dt><code>i <var>value</var></code></dt>
- <dd><p>Integer constant. <var>value</var> is the numeric value. The type is some
- sort of generic integer type (for GDB, a host <code>int</code>); to specify
- the type explicitly, use ‘<samp>e</samp>’ instead.
- </p>
- </dd>
- <dt><code>r <var>value</var></code></dt>
- <dd><p>Real constant. <var>value</var> is the real value, which can be ‘<samp>INF</samp>’
- (optionally preceded by a sign) for infinity, ‘<samp>QNAN</samp>’ for a quiet
- NaN (not-a-number), or ‘<samp>SNAN</samp>’ for a signalling NaN. If it is a
- normal number the format is that accepted by the C library function
- <code>atof</code>.
- </p>
- </dd>
- <dt><code>s <var>string</var></code></dt>
- <dd><p>String constant. <var>string</var> is a string enclosed in either ‘<samp>'</samp>’
- (in which case ‘<samp>'</samp>’ characters within the string are represented as
- ‘<samp>\'</samp>’ or ‘<samp>"</samp>’ (in which case ‘<samp>"</samp>’ characters within the
- string are represented as ‘<samp>\"</samp>’).
- </p>
- </dd>
- <dt><code>S <var>type-information</var> , <var>elements</var> , <var>bits</var> , <var>pattern</var></code></dt>
- <dd><p>Set constant. <var>type-information</var> is the type of the constant, as it
- would appear after a symbol descriptor (see <a href="String-Field.html#String-Field">String Field</a>).
- <var>elements</var> is the number of elements in the set (does this means
- how many bits of <var>pattern</var> are actually used, which would be
- redundant with the type, or perhaps the number of bits set in
- <var>pattern</var>? I don’t get it), <var>bits</var> is the number of bits in the
- constant (meaning it specifies the length of <var>pattern</var>, I think),
- and <var>pattern</var> 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 <var>pattern</var> should be
- understood to be target, not host, byte order and format.
- </p></dd>
- </dl>
-
- <p>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
- constants.
- </p>
- <p>The above information is followed by ‘<samp>;</samp>’.
- </p>
- <hr>
- <div class="header">
- <p>
- Next: <a href="Variables.html#Variables" accesskey="n" rel="next">Variables</a>, Previous: <a href="Program-Structure.html#Program-Structure" accesskey="p" rel="prev">Program Structure</a>, Up: <a href="index.html#Top" accesskey="u" rel="up">Top</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
- </div>
-
-
-
- </body>
- </html>
|