| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <html> |
| <!-- Copyright (C) 1992-2015 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 5.2, http://www.gnu.org/software/texinfo/ --> |
| <head> |
| <title>STABS: Traditional Integer Types</title> |
| |
| <meta name="description" content="STABS: Traditional Integer Types"> |
| <meta name="keywords" content="STABS: Traditional Integer Types"> |
| <meta name="resource-type" content="document"> |
| <meta name="distribution" content="global"> |
| <meta name="Generator" content="makeinfo"> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| <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="Traditional-Builtin-Types.html#Traditional-Builtin-Types" rel="up" title="Traditional Builtin Types"> |
| <link href="Traditional-Other-Types.html#Traditional-Other-Types" rel="next" title="Traditional Other Types"> |
| <link href="Traditional-Builtin-Types.html#Traditional-Builtin-Types" rel="prev" title="Traditional Builtin Types"> |
| <style type="text/css"> |
| <!-- |
| a.summary-letter {text-decoration: none} |
| blockquote.smallquotation {font-size: smaller} |
| div.display {margin-left: 3.2em} |
| div.example {margin-left: 3.2em} |
| div.indentedblock {margin-left: 3.2em} |
| div.lisp {margin-left: 3.2em} |
| div.smalldisplay {margin-left: 3.2em} |
| div.smallexample {margin-left: 3.2em} |
| div.smallindentedblock {margin-left: 3.2em; font-size: smaller} |
| 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.nocodebreak {white-space:nowrap} |
| span.nolinebreak {white-space:nowrap} |
| span.roman {font-family:serif; font-weight:normal} |
| span.sansserif {font-family:sans-serif; font-weight:normal} |
| ul.no-bullet {list-style: none} |
| --> |
| </style> |
| |
| |
| </head> |
| |
| <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> |
| <a name="Traditional-Integer-Types"></a> |
| <div class="header"> |
| <p> |
| Next: <a href="Traditional-Other-Types.html#Traditional-Other-Types" accesskey="n" rel="next">Traditional Other Types</a>, Up: <a href="Traditional-Builtin-Types.html#Traditional-Builtin-Types" accesskey="u" rel="up">Traditional Builtin Types</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="Traditional-Integer-Types-1"></a> |
| <h4 class="subsubsection">5.1.1.1 Traditional Integer Types</h4> |
| |
| <p>Often types are defined as subranges of themselves. If the bounding values |
| fit within an <code>int</code>, then they are given normally. For example: |
| </p> |
| <div class="example"> |
| <pre class="example">.stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0 # <span class="roman">128 is N_LSYM</span> |
| .stabs "char:t2=r2;0;127;",128,0,0,0 |
| </pre></div> |
| |
| <p>Builtin types can also be described as subranges of <code>int</code>: |
| </p> |
| <div class="example"> |
| <pre class="example">.stabs "unsigned short:t6=r1;0;65535;",128,0,0,0 |
| </pre></div> |
| |
| <p>If the lower bound of a subrange is 0 and the upper bound is -1, |
| the type is an unsigned integral type whose bounds are too |
| big to describe in an <code>int</code>. Traditionally this is only used for |
| <code>unsigned int</code> and <code>unsigned long</code>: |
| </p> |
| <div class="example"> |
| <pre class="example">.stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 |
| </pre></div> |
| |
| <p>For larger types, GCC 2.4.5 puts out bounds in octal, with one or more |
| leading zeroes. In this case a negative bound consists of a number |
| which is a 1 bit (for the sign bit) followed by a 0 bit for each bit in |
| the number (except the sign bit), and a positive bound is one which is a |
| 1 bit for each bit in the number (except possibly the sign bit). All |
| known versions of dbx and GDB version 4 accept this (at least in the |
| sense of not refusing to process the file), but GDB 3.5 refuses to read |
| the whole file containing such symbols. So GCC 2.3.3 did not output the |
| proper size for these types. As an example of octal bounds, the string |
| fields of the stabs for 64 bit integer types look like: |
| </p> |
| <div class="example"> |
| <pre class="example">long int:t3=r1;001000000000000000000000;000777777777777777777777; |
| long unsigned int:t5=r1;000000000000000000000000;001777777777777777777777; |
| </pre></div> |
| |
| <p>If the lower bound of a subrange is 0 and the upper bound is negative, |
| the type is an unsigned integral type whose size in bytes is the |
| absolute value of the upper bound. I believe this is a Convex |
| convention for <code>unsigned long long</code>. |
| </p> |
| <p>If the lower bound of a subrange is negative and the upper bound is 0, |
| the type is a signed integral type whose size in bytes is |
| the absolute value of the lower bound. I believe this is a Convex |
| convention for <code>long long</code>. To distinguish this from a legitimate |
| subrange, the type should be a subrange of itself. I’m not sure whether |
| this is the case for Convex. |
| </p> |
| <hr> |
| <div class="header"> |
| <p> |
| Next: <a href="Traditional-Other-Types.html#Traditional-Other-Types" accesskey="n" rel="next">Traditional Other Types</a>, Up: <a href="Traditional-Builtin-Types.html#Traditional-Builtin-Types" accesskey="u" rel="up">Traditional Builtin Types</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> |