| <html lang="en"> |
| <head> |
| <title>Traditional Integer Types - STABS</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="STABS"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Traditional-Builtin-Types.html#Traditional-Builtin-Types" title="Traditional Builtin Types"> |
| <link rel="next" href="Traditional-Other-Types.html#Traditional-Other-Types" title="Traditional Other Types"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| Copyright (C) 1992-2019 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''.--> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="Traditional-Integer-Types"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="Traditional-Other-Types.html#Traditional-Other-Types">Traditional Other Types</a>, |
| Up: <a rel="up" accesskey="u" href="Traditional-Builtin-Types.html#Traditional-Builtin-Types">Traditional Builtin Types</a> |
| <hr> |
| </div> |
| |
| <h5 class="subsubsection">5.1.1.1 Traditional Integer Types</h5> |
| |
| <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: |
| |
| <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> |
| <p>Builtin types can also be described as subranges of <code>int</code>: |
| |
| <pre class="example"> .stabs "unsigned short:t6=r1;0;65535;",128,0,0,0 |
| </pre> |
| <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>: |
| |
| <pre class="example"> .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0 |
| </pre> |
| <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: |
| |
| <!-- .stabs directives, etc., omitted to make it fit on the page. --> |
| <pre class="example"> long int:t3=r1;001000000000000000000000;000777777777777777777777; |
| long unsigned int:t5=r1;000000000000000000000000;001777777777777777777777; |
| </pre> |
| <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>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. |
| |
| </body></html> |
| |