Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

151 lines
7.3KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1992-2020 Free Software Foundation, Inc.
  4. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
  5. and David MacKenzie.
  6. Permission is granted to copy, distribute and/or modify this document
  7. under the terms of the GNU Free Documentation License, Version 1.3 or
  8. any later version published by the Free Software Foundation; with no
  9. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  10. Texts. A copy of the license is included in the section entitled "GNU
  11. Free Documentation License". -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Constants (STABS)</title>
  16. <meta name="description" content="Constants (STABS)">
  17. <meta name="keywords" content="Constants (STABS)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="index.html#Top" rel="up" title="Top">
  25. <link href="Variables.html#Variables" rel="next" title="Variables">
  26. <link href="Alternate-Entry-Points.html#Alternate-Entry-Points" rel="prev" title="Alternate Entry Points">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Constants"></a>
  57. <div class="header">
  58. <p>
  59. 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> &nbsp; [<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>
  60. </div>
  61. <hr>
  62. <a name="Constants-1"></a>
  63. <h2 class="chapter">3 Constants</h2>
  64. <p>The &lsquo;<samp>c</samp>&rsquo; symbol descriptor indicates that this stab represents a
  65. constant. This symbol descriptor is an exception to the general rule
  66. that symbol descriptors are followed by type information. Instead, it
  67. is followed by &lsquo;<samp>=</samp>&rsquo; and one of the following:
  68. </p>
  69. <dl compact="compact">
  70. <dt><code>b <var>value</var></code></dt>
  71. <dd><p>Boolean constant. <var>value</var> is a numeric value; I assume it is 0 for
  72. false or 1 for true.
  73. </p>
  74. </dd>
  75. <dt><code>c <var>value</var></code></dt>
  76. <dd><p>Character constant. <var>value</var> is the numeric value of the constant.
  77. </p>
  78. </dd>
  79. <dt><code>e <var>type-information</var> , <var>value</var></code></dt>
  80. <dd><p>Constant whose value can be represented as integral.
  81. <var>type-information</var> is the type of the constant, as it would appear
  82. after a symbol descriptor (see <a href="String-Field.html#String-Field">String Field</a>). <var>value</var> is the
  83. numeric value of the constant. GDB 4.9 does not actually get the right
  84. value if <var>value</var> does not fit in a host <code>int</code>, but it does not
  85. do anything violent, and future debuggers could be extended to accept
  86. integers of any size (whether unsigned or not). This constant type is
  87. usually documented as being only for enumeration constants, but GDB has
  88. never imposed that restriction; I don&rsquo;t know about other debuggers.
  89. </p>
  90. </dd>
  91. <dt><code>i <var>value</var></code></dt>
  92. <dd><p>Integer constant. <var>value</var> is the numeric value. The type is some
  93. sort of generic integer type (for GDB, a host <code>int</code>); to specify
  94. the type explicitly, use &lsquo;<samp>e</samp>&rsquo; instead.
  95. </p>
  96. </dd>
  97. <dt><code>r <var>value</var></code></dt>
  98. <dd><p>Real constant. <var>value</var> is the real value, which can be &lsquo;<samp>INF</samp>&rsquo;
  99. (optionally preceded by a sign) for infinity, &lsquo;<samp>QNAN</samp>&rsquo; for a quiet
  100. NaN (not-a-number), or &lsquo;<samp>SNAN</samp>&rsquo; for a signalling NaN. If it is a
  101. normal number the format is that accepted by the C library function
  102. <code>atof</code>.
  103. </p>
  104. </dd>
  105. <dt><code>s <var>string</var></code></dt>
  106. <dd><p>String constant. <var>string</var> is a string enclosed in either &lsquo;<samp>'</samp>&rsquo;
  107. (in which case &lsquo;<samp>'</samp>&rsquo; characters within the string are represented as
  108. &lsquo;<samp>\'</samp>&rsquo; or &lsquo;<samp>&quot;</samp>&rsquo; (in which case &lsquo;<samp>&quot;</samp>&rsquo; characters within the
  109. string are represented as &lsquo;<samp>\&quot;</samp>&rsquo;).
  110. </p>
  111. </dd>
  112. <dt><code>S <var>type-information</var> , <var>elements</var> , <var>bits</var> , <var>pattern</var></code></dt>
  113. <dd><p>Set constant. <var>type-information</var> is the type of the constant, as it
  114. would appear after a symbol descriptor (see <a href="String-Field.html#String-Field">String Field</a>).
  115. <var>elements</var> is the number of elements in the set (does this means
  116. how many bits of <var>pattern</var> are actually used, which would be
  117. redundant with the type, or perhaps the number of bits set in
  118. <var>pattern</var>? I don&rsquo;t get it), <var>bits</var> is the number of bits in the
  119. constant (meaning it specifies the length of <var>pattern</var>, I think),
  120. and <var>pattern</var> is a hexadecimal representation of the set. AIX
  121. documentation refers to a limit of 32 bytes, but I see no reason why
  122. this limit should exist. This form could probably be used for arbitrary
  123. constants, not just sets; the only catch is that <var>pattern</var> should be
  124. understood to be target, not host, byte order and format.
  125. </p></dd>
  126. </dl>
  127. <p>The boolean, character, string, and set constants are not supported by
  128. GDB 4.9, but it ignores them. GDB 4.8 and earlier gave an error
  129. message and refused to read symbols from the file containing the
  130. constants.
  131. </p>
  132. <p>The above information is followed by &lsquo;<samp>;</samp>&rsquo;.
  133. </p>
  134. <hr>
  135. <div class="header">
  136. <p>
  137. 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> &nbsp; [<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>
  138. </div>
  139. </body>
  140. </html>