add directory Ref-docs

This commit is contained in:
gohigh
2024-02-19 00:21:47 -05:00
parent 5a46ddb732
commit ef50495c9d
2492 changed files with 1609142 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: STABS</TITLE>
<META NAME="description" CONTENT="STABS: STABS">
<META NAME="keywords" CONTENT="STABS: STABS">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC_Top"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>STABS</H1></P><P>
This document describes the stabs debugging format.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC1">1. Overview of Stabs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Overview of stabs</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC7">2. Encoding the Structure of the Program</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Encoding of the structure of the program</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_3.html#SEC16">3. Constants</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC17">4. Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_5.html#SEC29">5. Defining Types</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Type definitions</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC46">6. Symbol Information in Symbol Tables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Symbol information in symbol tables</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_7.html#SEC52">7. GNU C++ Stabs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Stabs specific to C++</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_8.html#SEC67">A. Table of Stab Types</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Symbol types in a.out files</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_9.html#SEC70">B. Table of Symbol Descriptors</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Table of symbol descriptors</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_10.html#SEC71">C. Table of Type Descriptors</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Table of type descriptors</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC72">D. Expanded Reference by Stab Type</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Reference information by stab type</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_12.html#SEC86">E. Questions and Anomalies</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Questions and anomalies</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">In some object file formats, stabs are
in sections.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_14.html#SEC90">Symbol Types Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of symbolic stab symbol type names.</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<HR SIZE=1>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,469 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on May, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Overview</TITLE>
<META NAME="description" CONTENT="STABS: Overview">
<META NAME="keywords" CONTENT="STABS: Overview">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC1"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC2"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<A NAME="Overview"></A>
<H1> 1. Overview of Stabs </H1>
<!--docid::SEC1::-->
<P>
<EM>Stabs</EM> refers to a format for information that describes a program
to a debugger. This format was apparently invented by
Peter Kessler at
the University of California at Berkeley, for the <CODE>pdx</CODE> Pascal
debugger; the format has spread widely since then.
</P><P>
This document is one of the few published sources of documentation on
stabs. It is believed to be comprehensive for stabs used by C. The
lists of symbol descriptors (see section <A HREF="stabs_9.html#SEC70">B. Table of Symbol Descriptors</A>) and type
descriptors (see section <A HREF="stabs_10.html#SEC71">C. Table of Type Descriptors</A>) are believed to be completely
comprehensive. Stabs for COBOL-specific features and for variant
records (used by Pascal and Modula-2) are poorly documented here.
</P><P>
Other sources of information on stabs are <CITE>Dbx and Dbxtool
Interfaces</CITE>, 2nd edition, by Sun, 1988, and <CITE>AIX Version 3.2 Files
Reference</CITE>, Fourth Edition, September 1992, "dbx Stabstring Grammar" in
the a.out section, page 2-31. This document is believed to incorporate
the information from those two sources except where it explicitly directs
you to them for more information.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC2">1.1 Overview of Debugging Information Flow</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Overview of debugging information flow</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC3">1.2 Overview of Stab Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Overview of stab format</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC4">1.3 The String Field</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The string field</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC5">1.4 A Simple Example in C Source</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A simple example in C source</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_1.html#SEC6">1.5 The Simple Example at the Assembly Level</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The simple example at the assembly level</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Flow"></A>
<HR SIZE="6">
<A NAME="SEC2"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC3"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 1.1 Overview of Debugging Information Flow </H2>
<!--docid::SEC2::-->
<P>
The GNU C compiler compiles C source in a <TT>`.c'</TT> file into assembly
language in a <TT>`.s'</TT> file, which the assembler translates into
a <TT>`.o'</TT> file, which the linker combines with other <TT>`.o'</TT> files and
libraries to produce an executable file.
</P><P>
With the <SAMP>`-g'</SAMP> option, GCC puts in the <TT>`.s'</TT> file additional
debugging information, which is slightly transformed by the assembler
and linker, and carried through into the final executable. This
debugging information describes features of the source file like line
numbers, the types and scopes of variables, and function names,
parameters, and scopes.
</P><P>
For some object file formats, the debugging information is encapsulated
in assembler directives known collectively as <EM>stab</EM> (symbol table)
directives, which are interspersed with the generated code. Stabs are
the native format for debugging information in the a.out and XCOFF
object file formats. The GNU tools can also emit stabs in the COFF and
ECOFF object file formats.
</P><P>
The assembler adds the information from stabs to the symbol information
it places by default in the symbol table and the string table of the
<TT>`.o'</TT> file it is building. The linker consolidates the <TT>`.o'</TT>
files into one executable file, with one symbol table and one string
table. Debuggers use the symbol and string tables in the executable as
a source of debugging information about the program.
</P><P>
<A NAME="Stabs Format"></A>
<HR SIZE="6">
<A NAME="SEC3"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC2"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC4"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC4"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 1.2 Overview of Stab Format </H2>
<!--docid::SEC3::-->
<P>
There are three overall formats for stab assembler directives,
differentiated by the first word of the stab. The name of the directive
describes which combination of four possible data fields follows. It is
either <CODE>.stabs</CODE> (string), <CODE>.stabn</CODE> (number), or <CODE>.stabd</CODE>
(dot). IBM's XCOFF assembler uses <CODE>.stabx</CODE> (and some other
directives such as <CODE>.file</CODE> and <CODE>.bi</CODE>) instead of
<CODE>.stabs</CODE>, <CODE>.stabn</CODE> or <CODE>.stabd</CODE>.
</P><P>
The overall format of each class of stab is:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "<VAR>string</VAR>",<VAR>type</VAR>,<VAR>other</VAR>,<VAR>desc</VAR>,<VAR>value</VAR>
.stabn <VAR>type</VAR>,<VAR>other</VAR>,<VAR>desc</VAR>,<VAR>value</VAR>
.stabd <VAR>type</VAR>,<VAR>other</VAR>,<VAR>desc</VAR>
.stabx "<VAR>string</VAR>",<VAR>value</VAR>,<VAR>type</VAR>,<VAR>sdb-type</VAR>
</pre></td></tr></table></P><P>
For <CODE>.stabn</CODE> and <CODE>.stabd</CODE>, there is no <VAR>string</VAR> (the
<CODE>n_strx</CODE> field is zero; see <A HREF="stabs_6.html#SEC46">6. Symbol Information in Symbol Tables</A>). For
<CODE>.stabd</CODE>, the <VAR>value</VAR> field is implicit and has the value of
the current file location. For <CODE>.stabx</CODE>, the <VAR>sdb-type</VAR> field
is unused for stabs and can always be set to zero. The <VAR>other</VAR>
field is almost always unused and can be set to zero.
</P><P>
The number in the <VAR>type</VAR> field gives some basic information about
which type of stab this is (or whether it <EM>is</EM> a stab, as opposed
to an ordinary symbol). Each valid type number defines a different stab
type; further, the stab type defines the exact interpretation of, and
possible values for, any remaining <VAR>string</VAR>, <VAR>desc</VAR>, or
<VAR>value</VAR> fields present in the stab. See section <A HREF="stabs_8.html#SEC67">A. Table of Stab Types</A>, for a list
in numeric order of the valid <VAR>type</VAR> field values for stab directives.
</P><P>
<A NAME="String Field"></A>
<HR SIZE="6">
<A NAME="SEC4"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC3"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC5"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC5"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 1.3 The String Field </H2>
<!--docid::SEC4::-->
<P>
For most stabs the string field holds the meat of the
debugging information. The flexible nature of this field
is what makes stabs extensible. For some stab types the string field
contains only a name. For other stab types the contents can be a great
deal more complex.
</P><P>
The overall format of the string field for most stab types is:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>"<VAR>name</VAR>:<VAR>symbol-descriptor</VAR> <VAR>type-information</VAR>"
</pre></td></tr></table></P><P>
<VAR>name</VAR> is the name of the symbol represented by the stab; it can
contain a pair of colons (see section <A HREF="stabs_7.html#SEC54">7.2 Defining a Symbol Within Another Type</A>). <VAR>name</VAR> can be
omitted, which means the stab represents an unnamed object. For
example, <SAMP>`:t10=*2'</SAMP> defines type 10 as a pointer to type 2, but does
not give the type a name. Omitting the <VAR>name</VAR> field is supported by
AIX dbx and GDB after about version 4.8, but not other debuggers. GCC
sometimes uses a single space as the name instead of omitting the name
altogether; apparently that is supported by most debuggers.
</P><P>
The <VAR>symbol-descriptor</VAR> following the <SAMP>`:'</SAMP> is an alphabetic
character that tells more specifically what kind of symbol the stab
represents. If the <VAR>symbol-descriptor</VAR> is omitted, but type
information follows, then the stab represents a local variable. For a
list of symbol descriptors, see <A HREF="stabs_9.html#SEC70">B. Table of Symbol Descriptors</A>. The <SAMP>`c'</SAMP>
symbol descriptor is an exception in that it is not followed by type
information. See section <A HREF="stabs_3.html#SEC16">3. Constants</A>.
</P><P>
<VAR>type-information</VAR> is either a <VAR>type-number</VAR>, or
<SAMP>`<VAR>type-number</VAR>='</SAMP>. A <VAR>type-number</VAR> alone is a type
reference, referring directly to a type that has already been defined.
</P><P>
The <SAMP>`<VAR>type-number</VAR>='</SAMP> form is a type definition, where the
number represents a new type which is about to be defined. The type
definition may refer to other types by number, and those type numbers
may be followed by <SAMP>`='</SAMP> and nested definitions. Also, the Lucid
compiler will repeat <SAMP>`<VAR>type-number</VAR>='</SAMP> more than once if it
wants to define several type numbers at once.
</P><P>
In a type definition, if the character that follows the equals sign is
non-numeric then it is a <VAR>type-descriptor</VAR>, and tells what kind of
type is about to be defined. Any other values following the
<VAR>type-descriptor</VAR> vary, depending on the <VAR>type-descriptor</VAR>.
See section <A HREF="stabs_10.html#SEC71">C. Table of Type Descriptors</A>, for a list of <VAR>type-descriptor</VAR> values. If
a number follows the <SAMP>`='</SAMP> then the number is a <VAR>type-reference</VAR>.
For a full description of types, <A HREF="stabs_5.html#SEC29">5. Defining Types</A>.
</P><P>
A <VAR>type-number</VAR> is often a single number. The GNU and Sun tools
additionally permit a <VAR>type-number</VAR> to be a pair
(<VAR>file-number</VAR>,<VAR>filetype-number</VAR>) (the parentheses appear in the
string, and serve to distinguish the two cases). The <VAR>file-number</VAR>
is 0 for the base source file, 1 for the first included file, 2 for the
next, and so on. The <VAR>filetype-number</VAR> is a number starting with
1 which is incremented for each new type defined in the file.
(Separating the file number and the type number permits the
<CODE>N_BINCL</CODE> optimization to succeed more often; see <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>).
</P><P>
There is an AIX extension for type attributes. Following the <SAMP>`='</SAMP>
are any number of type attributes. Each one starts with <SAMP>`@'</SAMP> and
ends with <SAMP>`;'</SAMP>. Debuggers, including AIX's dbx and GDB 4.10, skip
any type attributes they do not recognize. GDB 4.9 and other versions
of dbx may not do this. Because of a conflict with C++
(see section <A HREF="stabs_7.html#SEC52">7. GNU C++ Stabs</A>), new attributes should not be defined which begin
with a digit, <SAMP>`('</SAMP>, or <SAMP>`-'</SAMP>; GDB may be unable to distinguish
those from the C++ type descriptor <SAMP>`@'</SAMP>. The attributes are:
</P><P>
<DL COMPACT>
<DT><CODE>a<VAR>boundary</VAR></CODE>
<DD><VAR>boundary</VAR> is an integer specifying the alignment. I assume it
applies to all variables of this type.
<P>
<DT><CODE>p<VAR>integer</VAR></CODE>
<DD>Pointer class (for checking). Not sure what this means, or how
<VAR>integer</VAR> is interpreted.
<P>
<DT><CODE>P</CODE>
<DD>Indicate this is a packed type, meaning that structure fields or array
elements are placed more closely in memory, to save memory at the
expense of speed.
<P>
<DT><CODE>s<VAR>size</VAR></CODE>
<DD>Size in bits of a variable of this type. This is fully supported by GDB
4.11 and later.
<P>
<DT><CODE>S</CODE>
<DD>Indicate that this type is a string instead of an array of characters,
or a bitstring instead of a set. It doesn't change the layout of the
data being represented, but does enable the debugger to know which type
it is.
<P>
<DT><CODE>V</CODE>
<DD>Indicate that this type is a vector instead of an array. The only
major difference between vectors and arrays is that vectors are
passed by value instead of by reference (vector coprocessor extension).
<P>
</DL>
<P>
All of this can make the string field quite long. All versions of GDB,
and some versions of dbx, can handle arbitrarily long strings. But many
versions of dbx (or assemblers or linkers, I'm not sure which)
cretinously limit the strings to about 80 characters, so compilers which
must work with such systems need to split the <CODE>.stabs</CODE> directive
into several <CODE>.stabs</CODE> directives. Each stab duplicates every field
except the string field. The string field of every stab except the last
is marked as continued with a backslash at the end (in the assembly code
this may be written as a double backslash, depending on the assembler).
Removing the backslashes and concatenating the string fields of each
stab produces the original, long string. Just to be incompatible (or so
they don't have to worry about what the assembler does with
backslashes), AIX can use <SAMP>`?'</SAMP> instead of backslash.
</P><P>
<A NAME="C Example"></A>
<HR SIZE="6">
<A NAME="SEC5"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC4"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC6"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 1.4 A Simple Example in C Source </H2>
<!--docid::SEC5::-->
<P>
To get the flavor of how stabs describe source information for a C
program, let's look at the simple program:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>main()
{
printf("Hello world");
}
</pre></td></tr></table></P><P>
When compiled with <SAMP>`-g'</SAMP>, the program above yields the following
<TT>`.s'</TT> file. Line numbers have been added to make it easier to refer
to parts of the <TT>`.s'</TT> file in the description of the stabs that
follows.
</P><P>
<A NAME="Assembly Code"></A>
<HR SIZE="6">
<A NAME="SEC6"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC5"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC1"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 1.5 The Simple Example at the Assembly Level </H2>
<!--docid::SEC6::-->
<P>
This simple "hello world" example demonstrates several of the stab
types used to describe C language source files.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>1 gcc2_compiled.:
2 .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0
3 .stabs "hello.c",100,0,0,Ltext0
4 .text
5 Ltext0:
6 .stabs "int:t1=r1;-2147483648;2147483647;",128,0,0,0
7 .stabs "char:t2=r2;0;127;",128,0,0,0
8 .stabs "long int:t3=r1;-2147483648;2147483647;",128,0,0,0
9 .stabs "unsigned int:t4=r1;0;-1;",128,0,0,0
10 .stabs "long unsigned int:t5=r1;0;-1;",128,0,0,0
11 .stabs "short int:t6=r1;-32768;32767;",128,0,0,0
12 .stabs "long long int:t7=r1;0;-1;",128,0,0,0
13 .stabs "short unsigned int:t8=r1;0;65535;",128,0,0,0
14 .stabs "long long unsigned int:t9=r1;0;-1;",128,0,0,0
15 .stabs "signed char:t10=r1;-128;127;",128,0,0,0
16 .stabs "unsigned char:t11=r1;0;255;",128,0,0,0
17 .stabs "float:t12=r1;4;0;",128,0,0,0
18 .stabs "double:t13=r1;8;0;",128,0,0,0
19 .stabs "long double:t14=r1;8;0;",128,0,0,0
20 .stabs "void:t15=15",128,0,0,0
21 .align 4
22 LC0:
23 .ascii "Hello, world!\12\0"
24 .align 4
25 .global _main
26 .proc 1
27 _main:
28 .stabn 68,0,4,LM1
29 LM1:
30 !#PROLOGUE# 0
31 save %sp,-136,%sp
32 !#PROLOGUE# 1
33 call ___main,0
34 nop
35 .stabn 68,0,5,LM2
36 LM2:
37 LBB2:
38 sethi %hi(LC0),%o1
39 or %o1,%lo(LC0),%o0
40 call _printf,0
41 nop
42 .stabn 68,0,6,LM3
43 LM3:
44 LBE2:
45 .stabn 68,0,6,LM4
46 LM4:
47 L1:
48 ret
49 restore
50 .stabs "main:F1",36,0,0,_main
51 .stabn 192,0,0,LBB2
52 .stabn 224,0,0,LBE2
</pre></td></tr></table></P><P>
<A NAME="Program Structure"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>May, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,234 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Type Descriptors</TITLE>
<META NAME="description" CONTENT="STABS: Type Descriptors">
<META NAME="keywords" CONTENT="STABS: Type Descriptors">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC71"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> C. Table of Type Descriptors </H1>
<!--docid::SEC71::-->
<P>
The type descriptor is the character which follows the type number and
an equals sign. It specifies what kind of type is being defined.
See section <A HREF="stabs_1.html#SEC4">1.3 The String Field</A>, for more information about their use.
</P><P>
<DL COMPACT>
<DT><CODE><VAR>digit</VAR></CODE>
<DD><DT><CODE>(</CODE>
<DD>Type reference; see <A HREF="stabs_1.html#SEC4">1.3 The String Field</A>.
<P>
<DT><CODE>-</CODE>
<DD>Reference to builtin type; see <A HREF="stabs_5.html#SEC35">5.1.3 Negative Type Numbers</A>.
<P>
<DT><CODE>#</CODE>
<DD>Method (C++); see <A HREF="stabs_7.html#SEC59">7.7 The <SAMP>`#'</SAMP> Type Descriptor</A>.
<P>
<DT><CODE>*</CODE>
<DD>Pointer; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>&#38;</CODE>
<DD>Reference (C++).
<P>
<DT><CODE>@</CODE>
<DD>Type Attributes (AIX); see <A HREF="stabs_1.html#SEC4">1.3 The String Field</A>. Member (class and variable)
type (GNU C++); see <A HREF="stabs_7.html#SEC60">7.8 The <SAMP>`@'</SAMP> Type Descriptor</A>.
<P>
<DT><CODE>a</CODE>
<DD>Array; see <A HREF="stabs_5.html#SEC39">5.5 Array Types</A>.
<P>
<DT><CODE>A</CODE>
<DD>Open array; see <A HREF="stabs_5.html#SEC39">5.5 Array Types</A>.
<P>
<DT><CODE>b</CODE>
<DD>Pascal space type (AIX); see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>. Builtin integer
type (Sun); see <A HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A>. Const and volatile
qualified type (OS9000).
<P>
<DT><CODE>B</CODE>
<DD>Volatile-qualified type; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>c</CODE>
<DD>Complex builtin type (AIX); see <A HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A>.
Const-qualified type (OS9000).
<P>
<DT><CODE>C</CODE>
<DD>COBOL Picture type. See AIX documentation for details.
<P>
<DT><CODE>d</CODE>
<DD>File type; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>D</CODE>
<DD>N-dimensional dynamic array; see <A HREF="stabs_5.html#SEC39">5.5 Array Types</A>.
<P>
<DT><CODE>e</CODE>
<DD>Enumeration type; see <A HREF="stabs_5.html#SEC41">5.7 Enumerations</A>.
<P>
<DT><CODE>E</CODE>
<DD>N-dimensional subarray; see <A HREF="stabs_5.html#SEC39">5.5 Array Types</A>.
<P>
<DT><CODE>f</CODE>
<DD>Function type; see <A HREF="stabs_5.html#SEC45">5.11 Function Types</A>.
<P>
<DT><CODE>F</CODE>
<DD>Pascal function parameter; see <A HREF="stabs_5.html#SEC45">5.11 Function Types</A>
<P>
<DT><CODE>g</CODE>
<DD>Builtin floating point type; see <A HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A>.
<P>
<DT><CODE>G</CODE>
<DD>COBOL Group. See AIX documentation for details.
<P>
<DT><CODE>i</CODE>
<DD>Imported type (AIX); see <A HREF="stabs_5.html#SEC37">5.3 Cross-References to Other Types</A>. Volatile-qualified
type (OS9000).
<P>
<DT><CODE>k</CODE>
<DD>Const-qualified type; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>K</CODE>
<DD>COBOL File Descriptor. See AIX documentation for details.
<P>
<DT><CODE>M</CODE>
<DD>Multiple instance type; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>n</CODE>
<DD>String type; see <A HREF="stabs_5.html#SEC40">5.6 Strings</A>.
<P>
<DT><CODE>N</CODE>
<DD>Stringptr; see <A HREF="stabs_5.html#SEC40">5.6 Strings</A>.
<P>
<DT><CODE>o</CODE>
<DD>Opaque type; see <A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A>.
<P>
<DT><CODE>p</CODE>
<DD>Procedure; see <A HREF="stabs_5.html#SEC45">5.11 Function Types</A>.
<P>
<DT><CODE>P</CODE>
<DD>Packed array; see <A HREF="stabs_5.html#SEC39">5.5 Array Types</A>.
<P>
<DT><CODE>r</CODE>
<DD>Range type; see <A HREF="stabs_5.html#SEC38">5.4 Subrange Types</A>.
<P>
<DT><CODE>R</CODE>
<DD>Builtin floating type; see <A HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A> (Sun). Pascal
subroutine parameter; see <A HREF="stabs_5.html#SEC45">5.11 Function Types</A> (AIX). Detecting this
conflict is possible with careful parsing (hint: a Pascal subroutine
parameter type will always contain a comma, and a builtin type
descriptor never will).
<P>
<DT><CODE>s</CODE>
<DD>Structure type; see <A HREF="stabs_5.html#SEC42">5.8 Structures</A>.
<P>
<DT><CODE>S</CODE>
<DD>Set type; see <A HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>.
<P>
<DT><CODE>u</CODE>
<DD>Union; see <A HREF="stabs_5.html#SEC44">5.10 Unions</A>.
<P>
<DT><CODE>v</CODE>
<DD>Variant record. This is a Pascal and Modula-2 feature which is like a
union within a struct in C. See AIX documentation for details.
<P>
<DT><CODE>w</CODE>
<DD>Wide character; see <A HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A>.
<P>
<DT><CODE>x</CODE>
<DD>Cross-reference; see <A HREF="stabs_5.html#SEC37">5.3 Cross-References to Other Types</A>.
<P>
<DT><CODE>Y</CODE>
<DD>Used by IBM's xlC C++ compiler (for structures, I think).
<P>
<DT><CODE>z</CODE>
<DD>gstring; see <A HREF="stabs_5.html#SEC40">5.6 Strings</A>.
</DL>
<P>
<A NAME="Expanded Reference"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,554 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Expanded Reference</TITLE>
<META NAME="description" CONTENT="STABS: Expanded Reference">
<META NAME="keywords" CONTENT="STABS: Expanded Reference">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC72"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC73"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> D. Expanded Reference by Stab Type </H1>
<!--docid::SEC72::-->
<P>
For a full list of stab types, and cross-references to where they are
described, see <A HREF="stabs_8.html#SEC67">A. Table of Stab Types</A>. This appendix just covers certain
stabs which are not yet described in the main body of this document;
eventually the information will all be in one place.
</P><P>
Format of an entry:
</P><P>
The first line is the symbol type (see <TT>`include/aout/stab.def'</TT>).
</P><P>
The second line describes the language constructs the symbol type
represents.
</P><P>
The third line is the stab format with the significant stab fields
named and the rest NIL.
</P><P>
Subsequent lines expand upon the meaning and possible values for each
significant stab field.
</P><P>
Finally, any further information.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC73">D.1 N_PC</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Pascal global symbol</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC74">D.2 N_NSYMS</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Number of symbols</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC75">D.3 N_NOMAP</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">No DST map</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC76">D.4 N_M2C</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modula-2 compilation unit</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC77">D.5 N_BROWS</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Path to .cb file for Sun source code browser</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC78">D.6 N_DEFD</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">GNU Modula2 definition module dependency</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC79">D.7 N_EHDECL</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">GNU C++ exception variable</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC80">D.8 N_MOD2</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modula2 information "for imc"</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC81">D.9 N_CATCH</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">GNU C++ "catch" clause</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC82">D.10 N_SSYM</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Structure or union element</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC83">D.11 N_SCOPE</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modula2 scope information (Sun only)</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">non-base register symbols used on Gould systems</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_11.html#SEC85">D.13 N_LENG</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Length of preceding entry</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="N_PC"></A>
<HR SIZE="6">
<A NAME="SEC73"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.1 N_PC </H2>
<!--docid::SEC73::-->
<P>
<A NAME="IDX51"></A>
<DL>
<DT><U><CODE>.stabs</CODE>:</U> <B>N_PC</B>
<DD><A NAME="IDX52"></A>
Global symbol (for Pascal).
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>"name" -> "symbol_name" &#60;&#60;?&#62;&#62;
value -&#62; supposedly the line number (stab.def is skeptical)
</pre></td></tr></table></P><P>
<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif"><TT>`stabdump.c'</TT> says:
global pascal symbol: name,,0,subtype,line
&#60;&#60; subtype? &#62;&#62;
</pre></td></tr></table></DL>
</P><P>
<A NAME="N_NSYMS"></A>
<HR SIZE="6">
<A NAME="SEC74"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC73"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC75"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC75"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.2 N_NSYMS </H2>
<!--docid::SEC74::-->
<P>
<A NAME="IDX53"></A>
<DL>
<DT><U><CODE>.stabn</CODE>:</U> <B>N_NSYMS</B>
<DD><A NAME="IDX54"></A>
Number of symbols (according to Ultrix V4.0).
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif"> 0, files,,funcs,lines (stab.def)
</pre></td></tr></table></DL>
</P><P>
<A NAME="N_NOMAP"></A>
<HR SIZE="6">
<A NAME="SEC75"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC76"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC76"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.3 N_NOMAP </H2>
<!--docid::SEC75::-->
<P>
<A NAME="IDX55"></A>
<DL>
<DT><U><CODE>.stabs</CODE>:</U> <B>N_NOMAP</B>
<DD><A NAME="IDX56"></A>
No DST map for symbol (according to Ultrix V4.0). I think this means a
variable has been optimized out.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif"> name, ,0,type,ignored (stab.def)
</pre></td></tr></table></DL>
</P><P>
<A NAME="N_M2C"></A>
<HR SIZE="6">
<A NAME="SEC76"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC75"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC77"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC77"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.4 N_M2C </H2>
<!--docid::SEC76::-->
<P>
<A NAME="IDX57"></A>
<DL>
<DT><U><CODE>.stabs</CODE>:</U> <B>N_M2C</B>
<DD><A NAME="IDX58"></A>
Modula-2 compilation unit.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>"string" -> "unit_name,unit_time_stamp[,code_time_stamp]"
desc -&#62; unit_number
value -&#62; 0 (main unit)
1 (any other unit)
</pre></td></tr></table></P><P>
See <CITE>Dbx and Dbxtool Interfaces</CITE>, 2nd edition, by Sun, 1988, for
more information.
</P><P>
</DL>
</P><P>
<A NAME="N_BROWS"></A>
<HR SIZE="6">
<A NAME="SEC77"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC76"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC78"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC78"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.5 N_BROWS </H2>
<!--docid::SEC77::-->
<P>
<A NAME="IDX59"></A>
<DL>
<DT><U><CODE>.stabs</CODE>:</U> <B>N_BROWS</B>
<DD><A NAME="IDX60"></A>
Sun source code browser, path to <TT>`.cb'</TT> file
</P><P>
&#60;&#60;?&#62;&#62;
"path to associated <TT>`.cb'</TT> file"
</P><P>
Note: N_BROWS has the same value as N_BSLINE.
</DL>
</P><P>
<A NAME="N_DEFD"></A>
<HR SIZE="6">
<A NAME="SEC78"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC77"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC79"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC79"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.6 N_DEFD </H2>
<!--docid::SEC78::-->
<P>
<A NAME="IDX61"></A>
<DL>
<DT><U><CODE>.stabn</CODE>:</U> <B>N_DEFD</B>
<DD><A NAME="IDX62"></A>
GNU Modula2 definition module dependency.
</P><P>
GNU Modula-2 definition module dependency. The value is the
modification time of the definition file. The other field is non-zero
if it is imported with the GNU M2 keyword <CODE>%INITIALIZE</CODE>. Perhaps
<CODE>N_M2C</CODE> can be used if there are enough empty fields?
</DL>
</P><P>
<A NAME="N_EHDECL"></A>
<HR SIZE="6">
<A NAME="SEC79"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC78"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC80"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC80"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.7 N_EHDECL </H2>
<!--docid::SEC79::-->
<P>
<A NAME="IDX63"></A>
<DL>
<DT><U><CODE>.stabs</CODE>:</U> <B>N_EHDECL</B>
<DD><A NAME="IDX64"></A>
GNU C++ exception variable &#60;&#60;?&#62;&#62;.
</P><P>
"<VAR>string</VAR> is variable name"
</P><P>
Note: conflicts with <CODE>N_MOD2</CODE>.
</DL>
</P><P>
<A NAME="N_MOD2"></A>
<HR SIZE="6">
<A NAME="SEC80"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC79"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC81"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC81"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.8 N_MOD2 </H2>
<!--docid::SEC80::-->
<P>
<A NAME="IDX65"></A>
<DL>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_MOD2</B>
<DD><A NAME="IDX66"></A>
Modula2 info "for imc" (according to Ultrix V4.0)
</P><P>
Note: conflicts with <CODE>N_EHDECL</CODE> &#60;&#60;?&#62;&#62;
</DL>
</P><P>
<A NAME="N_CATCH"></A>
<HR SIZE="6">
<A NAME="SEC81"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC80"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC82"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.9 N_CATCH </H2>
<!--docid::SEC81::-->
<P>
<A NAME="IDX67"></A>
<DL>
<DT><U><CODE>.stabn</CODE>:</U> <B>N_CATCH</B>
<DD><A NAME="IDX68"></A>
GNU C++ <CODE>catch</CODE> clause
</P><P>
GNU C++ <CODE>catch</CODE> clause. The value is its address. The desc field
is nonzero if this entry is immediately followed by a <CODE>CAUGHT</CODE> stab
saying what exception was caught. Multiple <CODE>CAUGHT</CODE> stabs means
that multiple exceptions can be caught here. If desc is 0, it means all
exceptions are caught here.
</DL>
</P><P>
<A NAME="N_SSYM"></A>
<HR SIZE="6">
<A NAME="SEC82"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC81"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC83"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.10 N_SSYM </H2>
<!--docid::SEC82::-->
<P>
<A NAME="IDX69"></A>
<DL>
<DT><U><CODE>.stabn</CODE>:</U> <B>N_SSYM</B>
<DD><A NAME="IDX70"></A>
Structure or union element.
</P><P>
The value is the offset in the structure.
</P><P>
&#60;&#60;?looking at structs and unions in C I didn't see these&#62;&#62;
</DL>
</P><P>
<A NAME="N_SCOPE"></A>
<HR SIZE="6">
<A NAME="SEC83"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC82"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC84"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.11 N_SCOPE </H2>
<!--docid::SEC83::-->
<P>
<A NAME="IDX71"></A>
<DL>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_SCOPE</B>
<DD><A NAME="IDX72"></A>
Modula2 scope information (Sun linker)
&#60;&#60;?&#62;&#62;
</DL>
</P><P>
<A NAME="Gould"></A>
<HR SIZE="6">
<A NAME="SEC84"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC83"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC85"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.12 Non-base registers on Gould systems </H2>
<!--docid::SEC84::-->
<P>
<A NAME="IDX73"></A>
<DL>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_NBTEXT</B>
<DD><A NAME="IDX74"></A>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_NBDATA</B>
<DD><A NAME="IDX75"></A>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_NBBSS</B>
<DD><A NAME="IDX76"></A>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_NBSTS</B>
<DD><A NAME="IDX77"></A>
<DT><U><CODE>.stab?</CODE>:</U> <B>N_NBLCS</B>
<DD><A NAME="IDX78"></A>
<A NAME="IDX79"></A>
<A NAME="IDX80"></A>
<A NAME="IDX81"></A>
<A NAME="IDX82"></A>
These are used on Gould systems for non-base registers syms.
</P><P>
However, the following values are not the values used by Gould; they are
the values which GNU has been documenting for these values for a long
time, without actually checking what Gould uses. I include these values
only because perhaps some someone actually did something with the GNU
information (I hope not, why GNU knowingly assigned wrong values to
these in the header file is a complete mystery to me).
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>240 0xf0 N_NBTEXT ??
242 0xf2 N_NBDATA ??
244 0xf4 N_NBBSS ??
246 0xf6 N_NBSTS ??
248 0xf8 N_NBLCS ??
</pre></td></tr></table></DL>
</P><P>
<A NAME="N_LENG"></A>
<HR SIZE="6">
<A NAME="SEC85"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC84"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC72"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> D.13 N_LENG </H2>
<!--docid::SEC85::-->
<P>
<A NAME="IDX83"></A>
<DL>
<DT><U><CODE>.stabn</CODE>:</U> <B>N_LENG</B>
<DD><A NAME="IDX84"></A>
Second symbol entry containing a length-value for the preceding entry.
The value is the length.
</DL>
</P><P>
<A NAME="Questions"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC74"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,93 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Questions</TITLE>
<META NAME="description" CONTENT="STABS: Questions">
<META NAME="keywords" CONTENT="STABS: Questions">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC86"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_11.html#SEC85"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> E. Questions and Anomalies </H1>
<!--docid::SEC86::-->
<P>
<UL>
<LI>
For GNU C stabs defining local and global variables (<CODE>N_LSYM</CODE> and
<CODE>N_GSYM</CODE>), the desc field is supposed to contain the source
line number on which the variable is defined. In reality the desc
field is always 0. (This behavior is defined in <TT>`dbxout.c'</TT> and
putting a line number in desc is controlled by <SAMP>`#ifdef
WINNING_GDB'</SAMP>, which defaults to false). GDB supposedly uses this
information if you say <SAMP>`list <VAR>var</VAR>'</SAMP>. In reality, <VAR>var</VAR> can
be a variable defined in the program and GDB says <SAMP>`function
<VAR>var</VAR> not defined'</SAMP>.
<P>
<LI>
In GNU C stabs, there seems to be no way to differentiate tag types:
structures, unions, and enums (symbol descriptor <SAMP>`T'</SAMP>) and typedefs
(symbol descriptor <SAMP>`t'</SAMP>) defined at file scope from types defined locally
to a procedure or other more local scope. They all use the <CODE>N_LSYM</CODE>
stab type. Types defined at procedure scope are emitted after the
<CODE>N_RBRAC</CODE> of the preceding function and before the code of the
procedure in which they are defined. This is exactly the same as
types defined in the source file between the two procedure bodies.
GDB over-compensates by placing all types in block #1, the block for
symbols of file scope. This is true for default, <SAMP>`-ansi'</SAMP> and
<SAMP>`-traditional'</SAMP> compiler options. (Bugs gcc/1063, gdb/1066.)
<P>
<LI>
What ends the procedure scope? Is it the proc block's <CODE>N_RBRAC</CODE> or the
next <CODE>N_FUN</CODE>? (I believe its the first.)
</UL>
<P>
<A NAME="Stab Sections"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,246 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Stab Sections</TITLE>
<META NAME="description" CONTENT="STABS: Stab Sections">
<META NAME="keywords" CONTENT="STABS: Stab Sections">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC87"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_12.html#SEC86"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC88"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> F. Using Stabs in Their Own Sections </H1>
<!--docid::SEC87::-->
<P>
Many object file formats allow tools to create object files with custom
sections containing any arbitrary data. For any such object file
format, stabs can be embedded in special sections. This is how stabs
are used with ELF and SOM, and aside from ECOFF and XCOFF, is how stabs
are used with COFF.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_13.html#SEC88">F.1 How to Embed Stabs in Sections</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to embed stabs in sections</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_13.html#SEC89">F.2 Having the Linker Relocate Stabs in ELF</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Sun ELF hacks</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Stab Section Basics"></A>
<HR SIZE="6">
<A NAME="SEC88"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC89"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> F.1 How to Embed Stabs in Sections </H2>
<!--docid::SEC88::-->
<P>
The assembler creates two custom sections, a section named <CODE>.stab</CODE>
which contains an array of fixed length structures, one struct per stab,
and a section named <CODE>.stabstr</CODE> containing all the variable length
strings that are referenced by stabs in the <CODE>.stab</CODE> section. The
byte order of the stabs binary data depends on the object file format.
For ELF, it matches the byte order of the ELF file itself, as determined
from the <CODE>EI_DATA</CODE> field in the <CODE>e_ident</CODE> member of the ELF
header. For SOM, it is always big-endian (is this true??? FIXME). For
COFF, it matches the byte order of the COFF headers. The meaning of the
fields is the same as for a.out (see section <A HREF="stabs_6.html#SEC47">6.1 Symbol Table Format</A>), except
that the <CODE>n_strx</CODE> field is relative to the strings for the current
compilation unit (which can be found using the synthetic N_UNDF stab
described below), rather than the entire string table.
</P><P>
The first stab in the <CODE>.stab</CODE> section for each compilation unit is
synthetic, generated entirely by the assembler, with no corresponding
<CODE>.stab</CODE> directive as input to the assembler. This stab contains
the following fields:
</P><P>
<DL COMPACT>
<DT><CODE>n_strx</CODE>
<DD>Offset in the <CODE>.stabstr</CODE> section to the source filename.
<P>
<DT><CODE>n_type</CODE>
<DD><CODE>N_UNDF</CODE>.
<P>
<DT><CODE>n_other</CODE>
<DD>Unused field, always zero.
This may eventually be used to hold overflows from the count in
the <CODE>n_desc</CODE> field.
<P>
<DT><CODE>n_desc</CODE>
<DD>Count of upcoming symbols, i.e., the number of remaining stabs for this
source file.
<P>
<DT><CODE>n_value</CODE>
<DD>Size of the string table fragment associated with this source file, in
bytes.
</DL>
<P>
The <CODE>.stabstr</CODE> section always starts with a null byte (so that string
offsets of zero reference a null string), followed by random length strings,
each of which is null byte terminated.
</P><P>
The ELF section header for the <CODE>.stab</CODE> section has its
<CODE>sh_link</CODE> member set to the section number of the <CODE>.stabstr</CODE>
section, and the <CODE>.stabstr</CODE> section has its ELF section
header <CODE>sh_type</CODE> member set to <CODE>SHT_STRTAB</CODE> to mark it as a
string table. SOM and COFF have no way of linking the sections together
or marking them as string tables.
</P><P>
For COFF, the <CODE>.stab</CODE> and <CODE>.stabstr</CODE> sections may be simply
concatenated by the linker. GDB then uses the <CODE>n_desc</CODE> fields to
figure out the extent of the original sections. Similarly, the
<CODE>n_value</CODE> fields of the header symbols are added together in order
to get the actual position of the strings in a desired <CODE>.stabstr</CODE>
section. Although this design obviates any need for the linker to
relocate or otherwise manipulate <CODE>.stab</CODE> and <CODE>.stabstr</CODE>
sections, it also requires some care to ensure that the offsets are
calculated correctly. For instance, if the linker were to pad in
between the <CODE>.stabstr</CODE> sections before concatenating, then the
offsets to strings in the middle of the executable's <CODE>.stabstr</CODE>
section would be wrong.
</P><P>
The GNU linker is able to optimize stabs information by merging
duplicate strings and removing duplicate header file information
(see section <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>). When some versions of the GNU linker optimize
stabs in sections, they remove the leading <CODE>N_UNDF</CODE> symbol and
arranges for all the <CODE>n_strx</CODE> fields to be relative to the start of
the <CODE>.stabstr</CODE> section.
</P><P>
<A NAME="ELF Linker Relocation"></A>
<HR SIZE="6">
<A NAME="SEC89"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC88"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC87"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> F.2 Having the Linker Relocate Stabs in ELF </H2>
<!--docid::SEC89::-->
<P>
This section describes some Sun hacks for Stabs in ELF; it does not
apply to COFF or SOM.
</P><P>
To keep linking fast, you don't want the linker to have to relocate very
many stabs. Making sure this is done for <CODE>N_SLINE</CODE>,
<CODE>N_RBRAC</CODE>, and <CODE>N_LBRAC</CODE> stabs is the most important thing
(see the descriptions of those stabs for more information). But Sun's
stabs in ELF has taken this further, to make all addresses in the
<CODE>n_value</CODE> field (functions and static variables) relative to the
source file. For the <CODE>N_SO</CODE> symbol itself, Sun simply omits the
address. To find the address of each section corresponding to a given
source file, the compiler puts out symbols giving the address of each
section for a given source file. Since these are ELF (not stab)
symbols, the linker relocates them correctly without having to touch the
stabs section. They are named <CODE>Bbss.bss</CODE> for the bss section,
<CODE>Ddata.data</CODE> for the data section, and <CODE>Drodata.rodata</CODE> for
the rodata section. For the text section, there is no such symbol (but
there should be, see below). For an example of how these symbols work,
See section <A HREF="stabs_6.html#SEC51">6.2.3 Transformations of Stabs in separate sections</A>. GCC does not provide these symbols;
it instead relies on the stabs getting relocated. Thus addresses which
would normally be relative to <CODE>Bbss.bss</CODE>, etc., are already
relocated. The Sun linker provided with Solaris 2.2 and earlier
relocates stabs using normal ELF relocation information, as it would do
for any section. Sun has been threatening to kludge their linker to not
do this (to speed up linking), even though the correct way to avoid
having the linker do these relocations is to have the compiler no longer
output relocatable values. Last I heard they had been talked out of the
linker kludge. See Sun point patch 101052-01 and Sun bug 1142109. With
the Sun compiler this affects <SAMP>`S'</SAMP> symbol descriptor stabs
(see section <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>) and functions (see section <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>). In the latter
case, to adopt the clean solution (making the value of the stab relative
to the start of the compilation unit), it would be necessary to invent a
<CODE>Ttext.text</CODE> symbol, analogous to the <CODE>Bbss.bss</CODE>, etc.,
symbols. I recommend this rather than using a zero value and getting
the address from the ELF symbols.
</P><P>
Finding the correct <CODE>Bbss.bss</CODE>, etc., symbol is difficult, because
the linker simply concatenates the <CODE>.stab</CODE> sections from each
<TT>`.o'</TT> file without including any information about which part of a
<CODE>.stab</CODE> section comes from which <TT>`.o'</TT> file. The way GDB does
this is to look for an ELF <CODE>STT_FILE</CODE> symbol which has the same
name as the last component of the file name from the <CODE>N_SO</CODE> symbol
in the stabs (for example, if the file name is <TT>`../../gdb/main.c'</TT>,
it looks for an ELF <CODE>STT_FILE</CODE> symbol named <CODE>main.c</CODE>). This
loses if different files have the same name (they could be in different
directories, a library could have been copied from one system to
another, etc.). It would be much cleaner to have the <CODE>Bbss.bss</CODE>
symbols in the stabs themselves. Having the linker relocate them there
is no more work than having the linker relocate ELF symbols, and it
solves the problem of having to associate the ELF and stab symbols.
However, no one has yet designed or implemented such a scheme.
</P><P>
<A NAME="Symbol Types Index"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,169 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Symbol Types Index</TITLE>
<META NAME="description" CONTENT="STABS: Symbol Types Index">
<META NAME="keywords" CONTENT="STABS: Symbol Types Index">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC90"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_13.html#SEC89"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> Symbol Types Index </H1>
<!--docid::SEC90::-->
<P>
<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="stabs_14.html#fn_." style="text-decoration:none"><b>.</b></A>
&nbsp;
<BR>
<A HREF="stabs_14.html#fn_C" style="text-decoration:none"><b>C</b></A>
&nbsp;
<A HREF="stabs_14.html#fn_N" style="text-decoration:none"><b>N</b></A>
&nbsp;
</td></tr></table><br><P></P>
<TABLE border=0>
<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_."></A>.</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX20"><CODE>.bb</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX21"><CODE>.be</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX33"><CODE>C_BCOMM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX8"><CODE>C_BINCL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX22"><CODE>C_BLOCK</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX42"><CODE>C_BSTAT</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_5.html#IDX50"><CODE>C_DECL, for types</CODE></A></TD><TD valign=top><A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX36"><CODE>C_ECOML</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX34"><CODE>C_ECOMM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX9"><CODE>C_EINCL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX24"><CODE>C_ENTRY</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC15">2.8 Alternate Entry Points</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX43"><CODE>C_ESTAT</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX3"><CODE>C_FILE</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC9">2.2 Paths and Names of the Source Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX17"><CODE>C_FUN</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX28"><CODE>C_GSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC19">4.2 Global Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX26"><CODE>C_LSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX45"><CODE>C_PSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC24">4.7 Parameters</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX46"><CODE>C_RPSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX30"><CODE>C_RSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC20">4.3 Register Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX41"><CODE>C_STSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
<TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX31"><CODE>N_BCOMM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX5"><CODE>N_BINCL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX59"><CODE>N_BROWS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC77">D.5 N_BROWS</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX60"><CODE>N_BROWS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC77">D.5 N_BROWS</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX12"><CODE>N_BSLINE</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX67"><CODE>N_CATCH</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC81">D.9 N_CATCH</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX68"><CODE>N_CATCH</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC81">D.9 N_CATCH</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX61"><CODE>N_DEFD</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC78">D.6 N_DEFD</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX62"><CODE>N_DEFD</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC78">D.6 N_DEFD</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX11"><CODE>N_DSLINE</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX35"><CODE>N_ECOML</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX32"><CODE>N_ECOMM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX63"><CODE>N_EHDECL</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC79">D.7 N_EHDECL</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX64"><CODE>N_EHDECL</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC79">D.7 N_EHDECL</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX6"><CODE>N_EINCL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX23"><CODE>N_ENTRY</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC15">2.8 Alternate Entry Points</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX7"><CODE>N_EXCL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX14"><CODE>N_FNAME</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX13"><CODE>N_FUN, for functions</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX39"><CODE>N_FUN, for variables</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX27"><CODE>N_GSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC19">4.2 Global Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX16"><CODE>N_GSYM, for functions (Sun acc)</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX18"><CODE>N_LBRAC</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX38"><CODE>N_LCSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX83"><CODE>N_LENG</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC85">D.13 N_LENG</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX84"><CODE>N_LENG</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC85">D.13 N_LENG</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX48"><CODE>N_LSYM, for parameter</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC26">4.7.2 Storing Parameters as Local Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX25"><CODE>N_LSYM, for stack variables</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_5.html#IDX49"><CODE>N_LSYM, for types</CODE></A></TD><TD valign=top><A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX57"><CODE>N_M2C</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC76">D.4 N_M2C</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX58"><CODE>N_M2C</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC76">D.4 N_M2C</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX1"><CODE>N_MAIN</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC8">2.1 Main Program</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX65"><CODE>N_MOD2</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC80">D.8 N_MOD2</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX66"><CODE>N_MOD2</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC80">D.8 N_MOD2</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX75"><CODE>N_NBBSS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX80"><CODE>N_NBBSS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX74"><CODE>N_NBDATA</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX79"><CODE>N_NBDATA</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX77"><CODE>N_NBLCS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX82"><CODE>N_NBLCS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX76"><CODE>N_NBSTS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX81"><CODE>N_NBSTS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX73"><CODE>N_NBTEXT</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX78"><CODE>N_NBTEXT</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX55"><CODE>N_NOMAP</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC75">D.3 N_NOMAP</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX56"><CODE>N_NOMAP</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC75">D.3 N_NOMAP</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX53"><CODE>N_NSYMS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC74">D.2 N_NSYMS</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX54"><CODE>N_NSYMS</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC74">D.2 N_NSYMS</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX51"><CODE>N_PC</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC73">D.1 N_PC</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX52"><CODE>N_PC</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC73">D.1 N_PC</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX44"><CODE>N_PSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC24">4.7 Parameters</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX19"><CODE>N_RBRAC</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX40"><CODE>N_ROSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX29"><CODE>N_RSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC20">4.3 Register Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX47"><CODE>N_RSYM, for parameters</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX71"><CODE>N_SCOPE</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC83">D.11 N_SCOPE</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX72"><CODE>N_SCOPE</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC83">D.11 N_SCOPE</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX10"><CODE>N_SLINE</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX2"><CODE>N_SO</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC9">2.2 Paths and Names of the Source Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX4"><CODE>N_SOL</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX69"><CODE>N_SSYM</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC82">D.10 N_SSYM</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_11.html#IDX70"><CODE>N_SSYM</CODE></A></TD><TD valign=top><A HREF="stabs_11.html#SEC82">D.10 N_SSYM</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_4.html#IDX37"><CODE>N_STSYM</CODE></A></TD><TD valign=top><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD></TR>
<TR><TD></TD><TD valign=top><A HREF="stabs_2.html#IDX15"><CODE>N_STSYM, for functions (Sun acc)</CODE></A></TD><TD valign=top><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD></TR>
<TR><TD COLSPAN=3> <HR></TD></TR>
</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="stabs_14.html#fn_." style="text-decoration:none"><b>.</b></A>
&nbsp;
<BR>
<A HREF="stabs_14.html#fn_C" style="text-decoration:none"><b>C</b></A>
&nbsp;
<A HREF="stabs_14.html#fn_N" style="text-decoration:none"><b>N</b></A>
&nbsp;
</td></tr></table><br></P><P>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,566 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Program Structure</TITLE>
<META NAME="description" CONTENT="STABS: Program Structure">
<META NAME="keywords" CONTENT="STABS: Program Structure">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC7"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_1.html#SEC6"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC8"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 2. Encoding the Structure of the Program </H1>
<!--docid::SEC7::-->
<P>
The elements of the program structure that stabs encode include the name
of the main function, the names of the source and include files, the
line numbers, procedure names and types, and the beginnings and ends of
blocks of code.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC8">2.1 Main Program</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Indicate what the main program is</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC9">2.2 Paths and Names of the Source Files</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The path and name of the source file</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Names of include files</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC12">2.5 Procedures</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC13">2.6 Nested Procedures</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC14">2.7 Block Structure</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_2.html#SEC15">2.8 Alternate Entry Points</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Entering procedures except at the beginning.</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Main Program"></A>
<HR SIZE="6">
<A NAME="SEC8"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC9"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.1 Main Program </H2>
<!--docid::SEC8::-->
<P>
<A NAME="IDX1"></A>
Most languages allow the main program to have any name. The
<CODE>N_MAIN</CODE> stab type tells the debugger the name that is used in this
program. Only the string field is significant; it is the name of
a function which is the main program. Most C compilers do not use this
stab (they expect the debugger to assume that the name is <CODE>main</CODE>),
but some C compilers emit an <CODE>N_MAIN</CODE> stab for the <CODE>main</CODE>
function. I'm not sure how XCOFF handles this.
</P><P>
<A NAME="Source Files"></A>
<HR SIZE="6">
<A NAME="SEC9"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC8"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC10"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC10"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.2 Paths and Names of the Source Files </H2>
<!--docid::SEC9::-->
<P>
<A NAME="IDX2"></A>
Before any other stabs occur, there must be a stab specifying the source
file. This information is contained in a symbol of stab type
<CODE>N_SO</CODE>; the string field contains the name of the file. The
value of the symbol is the start address of the portion of the
text section corresponding to that file.
</P><P>
With the Sun Solaris2 compiler, the desc field contains a
source-language code.
</P><P>
Some compilers (for example, GCC2 and SunOS4 <TT>`/bin/cc'</TT>) also
include the directory in which the source was compiled, in a second
<CODE>N_SO</CODE> symbol preceding the one containing the file name. This
symbol can be distinguished by the fact that it ends in a slash. Code
from the <CODE>cfront</CODE> C++ compiler can have additional <CODE>N_SO</CODE> symbols for
nonexistent source files after the <CODE>N_SO</CODE> for the real source file;
these are believed to contain no useful information.
</P><P>
For example:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # 100 is N_SO
.stabs "hello.c",100,0,0,Ltext0
.text
Ltext0:
</pre></td></tr></table></P><P>
<A NAME="IDX3"></A>
Instead of <CODE>N_SO</CODE> symbols, XCOFF uses a <CODE>.file</CODE> assembler
directive which assembles to a <CODE>C_FILE</CODE> symbol; explaining this in
detail is outside the scope of this document.
</P><P>
If it is useful to indicate the end of a source file, this is done with
an <CODE>N_SO</CODE> symbol with an empty string for the name. The value is
the address of the end of the text section for the file. For some
systems, there is no indication of the end of a source file, and you
just need to figure it ended when you see an <CODE>N_SO</CODE> for a different
source file, or a symbol ending in <CODE>.o</CODE> (which at least some
linkers insert to mark the start of a new <CODE>.o</CODE> file).
</P><P>
<A NAME="Include Files"></A>
<HR SIZE="6">
<A NAME="SEC10"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC9"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC11"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC11"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.3 Names of Include Files </H2>
<!--docid::SEC10::-->
<P>
There are several schemes for dealing with include files: the
traditional <CODE>N_SOL</CODE> approach, Sun's <CODE>N_BINCL</CODE> approach, and the
XCOFF <CODE>C_BINCL</CODE> approach (which despite the similar name has little in
common with <CODE>N_BINCL</CODE>).
</P><P>
<A NAME="IDX4"></A>
An <CODE>N_SOL</CODE> symbol specifies which include file subsequent symbols
refer to. The string field is the name of the file and the value is the
text address corresponding to the end of the previous include file and
the start of this one. To specify the main source file again, use an
<CODE>N_SOL</CODE> symbol with the name of the main source file.
</P><P>
<A NAME="IDX5"></A>
<A NAME="IDX6"></A>
<A NAME="IDX7"></A>
The <CODE>N_BINCL</CODE> approach works as follows. An <CODE>N_BINCL</CODE> symbol
specifies the start of an include file. In an object file, only the
string is significant; the linker puts data into some of the other
fields. The end of the include file is marked by an <CODE>N_EINCL</CODE>
symbol (which has no string field). In an object file, there is no
significant data in the <CODE>N_EINCL</CODE> symbol. <CODE>N_BINCL</CODE> and
<CODE>N_EINCL</CODE> can be nested.
</P><P>
If the linker detects that two source files have identical stabs between
an <CODE>N_BINCL</CODE> and <CODE>N_EINCL</CODE> pair (as will generally be the case
for a header file), then it only puts out the stabs once. Each
additional occurrence is replaced by an <CODE>N_EXCL</CODE> symbol. I believe
the GNU linker and the Sun (both SunOS4 and Solaris) linker are the only
ones which supports this feature.
</P><P>
A linker which supports this feature will set the value of a
<CODE>N_BINCL</CODE> symbol to the total of all the characters in the stabs
strings included in the header file, omitting any file numbers. The
value of an <CODE>N_EXCL</CODE> symbol is the same as the value of the
<CODE>N_BINCL</CODE> symbol it replaces. This information can be used to
match up <CODE>N_EXCL</CODE> and <CODE>N_BINCL</CODE> symbols which have the same
filename. The <CODE>N_EINCL</CODE> value, and the values of the other and
description fields for all three, appear to always be zero.
</P><P>
<A NAME="IDX8"></A>
<A NAME="IDX9"></A>
For the start of an include file in XCOFF, use the <TT>`.bi'</TT> assembler
directive, which generates a <CODE>C_BINCL</CODE> symbol. A <TT>`.ei'</TT>
directive, which generates a <CODE>C_EINCL</CODE> symbol, denotes the end of
the include file. Both directives are followed by the name of the
source file in quotes, which becomes the string for the symbol.
The value of each symbol, produced automatically by the assembler
and linker, is the offset into the executable of the beginning
(inclusive, as you'd expect) or end (inclusive, as you would not expect)
of the portion of the COFF line table that corresponds to this include
file. <CODE>C_BINCL</CODE> and <CODE>C_EINCL</CODE> do not nest.
</P><P>
<A NAME="Line Numbers"></A>
<HR SIZE="6">
<A NAME="SEC11"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC10"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC12"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC12"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.4 Line Numbers </H2>
<!--docid::SEC11::-->
<P>
<A NAME="IDX10"></A>
An <CODE>N_SLINE</CODE> symbol represents the start of a source line. The
desc field contains the line number and the value contains the code
address for the start of that source line. On most machines the address
is absolute; for stabs in sections (see section <A HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>), it is
relative to the function in which the <CODE>N_SLINE</CODE> symbol occurs.
</P><P>
<A NAME="IDX11"></A>
<A NAME="IDX12"></A>
GNU documents <CODE>N_DSLINE</CODE> and <CODE>N_BSLINE</CODE> symbols for line
numbers in the data or bss segments, respectively. They are identical
to <CODE>N_SLINE</CODE> but are relocated differently by the linker. They
were intended to be used to describe the source location of a variable
declaration, but I believe that GCC2 actually puts the line number in
the desc field of the stab for the variable itself. GDB has been
ignoring these symbols (unless they contain a string field) since
at least GDB 3.5.
</P><P>
For single source lines that generate discontiguous code, such as flow
of control statements, there may be more than one line number entry for
the same source line. In this case there is a line number entry at the
start of each code range, each with the same line number.
</P><P>
XCOFF does not use stabs for line numbers. Instead, it uses COFF line
numbers (which are outside the scope of this document). Standard COFF
line numbers cannot deal with include files, but in XCOFF this is fixed
with the <CODE>C_BINCL</CODE> method of marking include files (see section <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>).
</P><P>
<A NAME="Procedures"></A>
<HR SIZE="6">
<A NAME="SEC12"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC11"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC13"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC13"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.5 Procedures </H2>
<!--docid::SEC12::-->
<P>
<A NAME="IDX13"></A>
<A NAME="IDX14"></A>
<A NAME="IDX15"></A>
<A NAME="IDX16"></A>
All of the following stabs normally use the <CODE>N_FUN</CODE> symbol type.
However, Sun's <CODE>acc</CODE> compiler on SunOS4 uses <CODE>N_GSYM</CODE> and
<CODE>N_STSYM</CODE>, which means that the value of the stab for the function
is useless and the debugger must get the address of the function from
the non-stab symbols instead. On systems where non-stab symbols have
leading underscores, the stabs will lack underscores and the debugger
needs to know about the leading underscore to match up the stab and the
non-stab symbol. BSD Fortran is said to use <CODE>N_FNAME</CODE> with the
same restriction; the value of the symbol is not useful (I'm not sure it
really does use this, because GDB doesn't handle this and no one has
complained).
</P><P>
<A NAME="IDX17"></A>
A function is represented by an <SAMP>`F'</SAMP> symbol descriptor for a global
(extern) function, and <SAMP>`f'</SAMP> for a static (local) function. For
a.out, the value of the symbol is the address of the start of the
function; it is already relocated. For stabs in ELF, the SunPRO
compiler version 2.0.1 and GCC put out an address which gets relocated
by the linker. In a future release SunPRO is planning to put out zero,
in which case the address can be found from the ELF (non-stab) symbol.
Because looking things up in the ELF symbols would probably be slow, I'm
not sure how to find which symbol of that name is the right one, and
this doesn't provide any way to deal with nested functions, it would
probably be better to make the value of the stab an address relative to
the start of the file, or just absolute. See <A HREF="stabs_13.html#SEC89">F.2 Having the Linker Relocate Stabs in ELF</A> for more information on linker relocation of stabs in ELF
files. For XCOFF, the stab uses the <CODE>C_FUN</CODE> storage class and the
value of the stab is meaningless; the address of the function can be
found from the csect symbol (XTY_LD/XMC_PR).
</P><P>
The type information of the stab represents the return type of the
function; thus <SAMP>`foo:f5'</SAMP> means that foo is a function returning type
5. There is no need to try to get the line number of the start of the
function from the stab for the function; it is in the next
<CODE>N_SLINE</CODE> symbol.
</P><P>
Some compilers (such as Sun's Solaris compiler) support an extension for
specifying the types of the arguments. I suspect this extension is not
used for old (non-prototyped) function definitions in C. If the
extension is in use, the type information of the stab for the function
is followed by type information for each argument, with each argument
preceded by <SAMP>`;'</SAMP>. An argument type of 0 means that additional
arguments are being passed, whose types and number may vary (<SAMP>`...'</SAMP>
in ANSI C). GDB has tolerated this extension (parsed the syntax, if not
necessarily used the information) since at least version 4.8; I don't
know whether all versions of dbx tolerate it. The argument types given
here are not redundant with the symbols for the formal parameters
(see section <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>); they are the types of the arguments as they are
passed, before any conversions might take place. For example, if a C
function which is declared without a prototype takes a <CODE>float</CODE>
argument, the value is passed as a <CODE>double</CODE> but then converted to a
<CODE>float</CODE>. Debuggers need to use the types given in the arguments
when printing values, but when calling the function they need to use the
types given in the symbol defining the function.
</P><P>
If the return type and types of arguments of a function which is defined
in another source file are specified (i.e., a function prototype in ANSI
C), traditionally compilers emit no stab; the only way for the debugger
to find the information is if the source file where the function is
defined was also compiled with debugging symbols. As an extension the
Solaris compiler uses symbol descriptor <SAMP>`P'</SAMP> followed by the return
type of the function, followed by the arguments, each preceded by
<SAMP>`;'</SAMP>, as in a stab with symbol descriptor <SAMP>`f'</SAMP> or <SAMP>`F'</SAMP>.
This use of symbol descriptor <SAMP>`P'</SAMP> can be distinguished from its use
for register parameters (see section <A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A>) by the fact that it has
symbol type <CODE>N_FUN</CODE>.
</P><P>
The AIX documentation also defines symbol descriptor <SAMP>`J'</SAMP> as an
internal function. I assume this means a function nested within another
function. It also says symbol descriptor <SAMP>`m'</SAMP> is a module in
Modula-2 or extended Pascal.
</P><P>
Procedures (functions which do not return values) are represented as
functions returning the <CODE>void</CODE> type in C. I don't see why this couldn't
be used for all languages (inventing a <CODE>void</CODE> type for this purpose if
necessary), but the AIX documentation defines <SAMP>`I'</SAMP>, <SAMP>`P'</SAMP>, and
<SAMP>`Q'</SAMP> for internal, global, and static procedures, respectively.
These symbol descriptors are unusual in that they are not followed by
type information.
</P><P>
The following example shows a stab for a function <CODE>main</CODE> which
returns type number <CODE>1</CODE>. The <CODE>_main</CODE> specified for the value
is a reference to an assembler label which is used to fill in the start
address of the function.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "main:F1",36,0,0,_main # 36 is N_FUN
</pre></td></tr></table></P><P>
The stab representing a procedure is located immediately following the
code of the procedure. This stab is in turn directly followed by a
group of other stabs describing elements of the procedure. These other
stabs describe the procedure's parameters, its block local variables, and
its block structure.
</P><P>
If functions can appear in different sections, then the debugger may not
be able to find the end of a function. Recent versions of GCC will mark
the end of a function with an <CODE>N_FUN</CODE> symbol with an empty string
for the name. The value is the address of the end of the current
function. Without such a symbol, there is no indication of the address
of the end of a function, and you must assume that it ended at the
starting address of the next function or at the end of the text section
for the program.
</P><P>
<A NAME="Nested Procedures"></A>
<HR SIZE="6">
<A NAME="SEC13"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC12"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC14"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC14"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.6 Nested Procedures </H2>
<!--docid::SEC13::-->
<P>
For any of the symbol descriptors representing procedures, after the
symbol descriptor and the type information is optionally a scope
specifier. This consists of a comma, the name of the procedure, another
comma, and the name of the enclosing procedure. The first name is local
to the scope specified, and seems to be redundant with the name of the
symbol (before the <SAMP>`:'</SAMP>). This feature is used by GCC, and
presumably Pascal, Modula-2, etc., compilers, for nested functions.
</P><P>
If procedures are nested more than one level deep, only the immediately
containing scope is specified. For example, this code:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>int
foo (int x)
{
int bar (int y)
{
int baz (int z)
{
return x + y + z;
}
return baz (x + 2 * y);
}
return x + bar (3 * x);
}
</pre></td></tr></table></P><P>
produces the stabs:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "baz:f1,baz,bar",36,0,0,_baz.15 # 36 is N_FUN
.stabs "bar:f1,bar,foo",36,0,0,_bar.12
.stabs "foo:F1",36,0,0,_foo
</pre></td></tr></table></P><P>
<A NAME="Block Structure"></A>
<HR SIZE="6">
<A NAME="SEC14"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC13"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC15"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC15"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.7 Block Structure </H2>
<!--docid::SEC14::-->
<P>
<A NAME="IDX18"></A>
<A NAME="IDX19"></A>
The program's block structure is represented by the <CODE>N_LBRAC</CODE> (left
brace) and the <CODE>N_RBRAC</CODE> (right brace) stab types. The variables
defined inside a block precede the <CODE>N_LBRAC</CODE> symbol for most
compilers, including GCC. Other compilers, such as the Convex, Acorn
RISC machine, and Sun <CODE>acc</CODE> compilers, put the variables after the
<CODE>N_LBRAC</CODE> symbol. The values of the <CODE>N_LBRAC</CODE> and
<CODE>N_RBRAC</CODE> symbols are the start and end addresses of the code of
the block, respectively. For most machines, they are relative to the
starting address of this source file. For the Gould NP1, they are
absolute. For stabs in sections (see section <A HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>), they are
relative to the function in which they occur.
</P><P>
The <CODE>N_LBRAC</CODE> and <CODE>N_RBRAC</CODE> stabs that describe the block
scope of a procedure are located after the <CODE>N_FUN</CODE> stab that
represents the procedure itself.
</P><P>
Sun documents the desc field of <CODE>N_LBRAC</CODE> and
<CODE>N_RBRAC</CODE> symbols as containing the nesting level of the block.
However, dbx seems to not care, and GCC always sets desc to
zero.
</P><P>
<A NAME="IDX20"></A>
<A NAME="IDX21"></A>
<A NAME="IDX22"></A>
For XCOFF, block scope is indicated with <CODE>C_BLOCK</CODE> symbols. If the
name of the symbol is <SAMP>`.bb'</SAMP>, then it is the beginning of the block;
if the name of the symbol is <SAMP>`.be'</SAMP>; it is the end of the block.
</P><P>
<A NAME="Alternate Entry Points"></A>
<HR SIZE="6">
<A NAME="SEC15"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC14"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 2.8 Alternate Entry Points </H2>
<!--docid::SEC15::-->
<P>
<A NAME="IDX23"></A>
<A NAME="IDX24"></A>
Some languages, like Fortran, have the ability to enter procedures at
some place other than the beginning. One can declare an alternate entry
point. The <CODE>N_ENTRY</CODE> stab is for this; however, the Sun FORTRAN
compiler doesn't use it. According to AIX documentation, only the name
of a <CODE>C_ENTRY</CODE> stab is significant; the address of the alternate
entry point comes from the corresponding external symbol. A previous
revision of this document said that the value of an <CODE>N_ENTRY</CODE> stab
was the address of the alternate entry point, but I don't know the
source for that information.
</P><P>
<A NAME="Constants"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC7"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,134 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Constants</TITLE>
<META NAME="description" CONTENT="STABS: Constants">
<META NAME="keywords" CONTENT="STABS: Constants">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC16"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_2.html#SEC15"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 3. Constants </H1>
<!--docid::SEC16::-->
<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><P>
<DL COMPACT>
<DT><CODE>b <VAR>value</VAR></CODE>
<DD>Boolean constant. <VAR>value</VAR> is a numeric value; I assume it is 0 for
false or 1 for true.
<P>
<DT><CODE>c <VAR>value</VAR></CODE>
<DD>Character constant. <VAR>value</VAR> is the numeric value of the constant.
<P>
<DT><CODE>e <VAR>type-information</VAR> , <VAR>value</VAR></CODE>
<DD>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 section <A HREF="stabs_1.html#SEC4">1.3 The 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>
<DT><CODE>i <VAR>value</VAR></CODE>
<DD>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>
<DT><CODE>r <VAR>value</VAR></CODE>
<DD>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>
<DT><CODE>s <VAR>string</VAR></CODE>
<DD>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>
<DT><CODE>S <VAR>type-information</VAR> , <VAR>elements</VAR> , <VAR>bits</VAR> , <VAR>pattern</VAR></CODE>
<DD>Set constant. <VAR>type-information</VAR> is the type of the constant, as it
would appear after a symbol descriptor (see section <A HREF="stabs_1.html#SEC4">1.3 The 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.
</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><P>
<A NAME="Variables"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,731 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Variables</TITLE>
<META NAME="description" CONTENT="STABS: Variables">
<META NAME="keywords" CONTENT="STABS: Variables">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC17"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_3.html#SEC16"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC18"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 4. Variables </H1>
<!--docid::SEC17::-->
<P>
Different types of stabs describe the various ways that variables can be
allocated: on the stack, globally, in registers, in common blocks,
statically, or as arguments to a function.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables allocated on the stack.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC19">4.2 Global Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables used by more than one source file.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC20">4.3 Register Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables in registers.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables statically allocated together.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC22">4.5 Static Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables local to one source file.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC23">4.6 Fortran Based Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Fortran pointer based variables.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC24">4.7 Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables for arguments to functions.</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Stack Variables"></A>
<HR SIZE="6">
<A NAME="SEC18"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC19"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.1 Automatic Variables Allocated on the Stack </H2>
<!--docid::SEC18::-->
<P>
If a variable's scope is local to a function and its lifetime is only as
long as that function executes (C calls such variables
<EM>automatic</EM>), it can be allocated in a register (see section <A HREF="stabs_4.html#SEC20">4.3 Register Variables</A>) or on the stack.
</P><P>
<A NAME="IDX25"></A>
<A NAME="IDX26"></A>
Each variable allocated on the stack has a stab with the symbol
descriptor omitted. Since type information should begin with a digit,
<SAMP>`-'</SAMP>, or <SAMP>`('</SAMP>, only those characters precluded from being used
for symbol descriptors. However, the Acorn RISC machine (ARM) is said
to get this wrong: it puts out a mere type definition here, without the
preceding <SAMP>`<VAR>type-number</VAR>='</SAMP>. This is a bad idea; there is no
guarantee that type descriptors are distinct from symbol descriptors.
Stabs for stack variables use the <CODE>N_LSYM</CODE> stab type, or
<CODE>C_LSYM</CODE> for XCOFF.
</P><P>
The value of the stab is the offset of the variable within the
local variables. On most machines this is an offset from the frame
pointer and is negative. The location of the stab specifies which block
it is defined in; see <A HREF="stabs_2.html#SEC14">2.7 Block Structure</A>.
</P><P>
For example, the following C code:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>int
main ()
{
int x;
}
</pre></td></tr></table></P><P>
produces the following stabs:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "main:F1",36,0,0,_main # 36 is N_FUN
.stabs "x:1",128,0,0,-12 # 128 is N_LSYM
.stabn 192,0,0,LBB2 # 192 is N_LBRAC
.stabn 224,0,0,LBE2 # 224 is N_RBRAC
</pre></td></tr></table></P><P>
See <A HREF="stabs_2.html#SEC12">2.5 Procedures</A> for more information on the <CODE>N_FUN</CODE> stab, and
<A HREF="stabs_2.html#SEC14">2.7 Block Structure</A> for more information on the <CODE>N_LBRAC</CODE> and
<CODE>N_RBRAC</CODE> stabs.
</P><P>
<A NAME="Global Variables"></A>
<HR SIZE="6">
<A NAME="SEC19"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC18"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC20"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC20"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.2 Global Variables </H2>
<!--docid::SEC19::-->
<P>
<A NAME="IDX27"></A>
<A NAME="IDX28"></A>
A variable whose scope is not specific to just one source file is
represented by the <SAMP>`G'</SAMP> symbol descriptor. These stabs use the
<CODE>N_GSYM</CODE> stab type (C_GSYM for XCOFF). The type information for
the stab (see section <A HREF="stabs_1.html#SEC4">1.3 The String Field</A>) gives the type of the variable.
</P><P>
For example, the following source code:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>char g_foo = 'c';
</pre></td></tr></table></P><P>
yields the following assembly code:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "g_foo:G2",32,0,0,0 # 32 is N_GSYM
.global _g_foo
.data
_g_foo:
.byte 99
</pre></td></tr></table></P><P>
The address of the variable represented by the <CODE>N_GSYM</CODE> is not
contained in the <CODE>N_GSYM</CODE> stab. The debugger gets this information
from the external symbol for the global variable. In the example above,
the <CODE>.global _g_foo</CODE> and <CODE>_g_foo:</CODE> lines tell the assembler to
produce an external symbol.
</P><P>
Some compilers, like GCC, output <CODE>N_GSYM</CODE> stabs only once, where
the variable is defined. Other compilers, like SunOS4 /bin/cc, output a
<CODE>N_GSYM</CODE> stab for each compilation unit which references the
variable.
</P><P>
<A NAME="Register Variables"></A>
<HR SIZE="6">
<A NAME="SEC20"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC19"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC21"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC21"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.3 Register Variables </H2>
<!--docid::SEC20::-->
<P>
<A NAME="IDX29"></A>
<A NAME="IDX30"></A>
Register variables have their own stab type, <CODE>N_RSYM</CODE>
(<CODE>C_RSYM</CODE> for XCOFF), and their own symbol descriptor, <SAMP>`r'</SAMP>.
The stab's value is the number of the register where the variable data
will be stored.
</P><P>
AIX defines a separate symbol descriptor <SAMP>`d'</SAMP> for floating point
registers. This seems unnecessary; why not just just give floating
point registers different register numbers? I have not verified whether
the compiler actually uses <SAMP>`d'</SAMP>.
</P><P>
If the register is explicitly allocated to a global variable, but not
initialized, as in:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>register int g_bar asm ("%g5");
</pre></td></tr></table></P><P>
then the stab may be emitted at the end of the object file, with
the other bss symbols.
</P><P>
<A NAME="Common Blocks"></A>
<HR SIZE="6">
<A NAME="SEC21"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC20"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC22"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC22"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.4 Common Blocks </H2>
<!--docid::SEC21::-->
<P>
A common block is a statically allocated section of memory which can be
referred to by several source files. It may contain several variables.
I believe Fortran is the only language with this feature.
</P><P>
<A NAME="IDX31"></A>
<A NAME="IDX32"></A>
<A NAME="IDX33"></A>
<A NAME="IDX34"></A>
A <CODE>N_BCOMM</CODE> stab begins a common block and an <CODE>N_ECOMM</CODE> stab
ends it. The only field that is significant in these two stabs is the
string, which names a normal (non-debugging) symbol that gives the
address of the common block. According to IBM documentation, only the
<CODE>N_BCOMM</CODE> has the name of the common block (even though their
compiler actually puts it both places).
</P><P>
<A NAME="IDX35"></A>
<A NAME="IDX36"></A>
The stabs for the members of the common block are between the
<CODE>N_BCOMM</CODE> and the <CODE>N_ECOMM</CODE>; the value of each stab is the
offset within the common block of that variable. IBM uses the
<CODE>C_ECOML</CODE> stab type, and there is a corresponding <CODE>N_ECOML</CODE>
stab type, but Sun's Fortran compiler uses <CODE>N_GSYM</CODE> instead. The
variables within a common block use the <SAMP>`V'</SAMP> symbol descriptor (I
believe this is true of all Fortran variables). Other stabs (at least
type declarations using <CODE>C_DECL</CODE>) can also be between the
<CODE>N_BCOMM</CODE> and the <CODE>N_ECOMM</CODE>.
</P><P>
<A NAME="Statics"></A>
<HR SIZE="6">
<A NAME="SEC22"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC21"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC23"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC23"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.5 Static Variables </H2>
<!--docid::SEC22::-->
<P>
Initialized static variables are represented by the <SAMP>`S'</SAMP> and
<SAMP>`V'</SAMP> symbol descriptors. <SAMP>`S'</SAMP> means file scope static, and
<SAMP>`V'</SAMP> means procedure scope static. One exception: in XCOFF, IBM's
xlc compiler always uses <SAMP>`V'</SAMP>, and whether it is file scope or not
is distinguished by whether the stab is located within a function.
</P><P>
<A NAME="IDX37"></A>
<A NAME="IDX38"></A>
<A NAME="IDX39"></A>
<A NAME="IDX40"></A>
In a.out files, <CODE>N_STSYM</CODE> means the data section, <CODE>N_FUN</CODE>
means the text section, and <CODE>N_LCSYM</CODE> means the bss section. For
those systems with a read-only data section separate from the text
section (Solaris), <CODE>N_ROSYM</CODE> means the read-only data section.
</P><P>
For example, the source lines:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>static const int var_const = 5;
static int var_init = 2;
static int var_noinit;
</pre></td></tr></table></P><P>
yield the following stabs:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "var_const:S1",36,0,0,_var_const # 36 is N_FUN
<small>...</small>
.stabs "var_init:S1",38,0,0,_var_init # 38 is N_STSYM
<small>...</small>
.stabs "var_noinit:S1",40,0,0,_var_noinit # 40 is N_LCSYM
</pre></td></tr></table></P><P>
<A NAME="IDX41"></A>
<A NAME="IDX42"></A>
<A NAME="IDX43"></A>
In XCOFF files, the stab type need not indicate the section;
<CODE>C_STSYM</CODE> can be used for all statics. Also, each static variable
is enclosed in a static block. A <CODE>C_BSTAT</CODE> (emitted with a
<SAMP>`.bs'</SAMP> assembler directive) symbol begins the static block; its
value is the symbol number of the csect symbol whose value is the
address of the static block, its section is the section of the variables
in that static block, and its name is <SAMP>`.bs'</SAMP>. A <CODE>C_ESTAT</CODE>
(emitted with a <SAMP>`.es'</SAMP> assembler directive) symbol ends the static
block; its name is <SAMP>`.es'</SAMP> and its value and section are ignored.
</P><P>
In ECOFF files, the storage class is used to specify the section, so the
stab type need not indicate the section.
</P><P>
In ELF files, for the SunPRO compiler version 2.0.1, symbol descriptor
<SAMP>`S'</SAMP> means that the address is absolute (the linker relocates it)
and symbol descriptor <SAMP>`V'</SAMP> means that the address is relative to the
start of the relevant section for that compilation unit. SunPRO has
plans to have the linker stop relocating stabs; I suspect that their the
debugger gets the address from the corresponding ELF (not stab) symbol.
I'm not sure how to find which symbol of that name is the right one.
The clean way to do all this would be to have a the value of a symbol
descriptor <SAMP>`S'</SAMP> symbol be an offset relative to the start of the
file, just like everything else, but that introduces obvious
compatibility problems. For more information on linker stab relocation,
See section <A HREF="stabs_13.html#SEC89">F.2 Having the Linker Relocate Stabs in ELF</A>.
</P><P>
<A NAME="Based Variables"></A>
<HR SIZE="6">
<A NAME="SEC23"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC22"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.6 Fortran Based Variables </H2>
<!--docid::SEC23::-->
<P>
Fortran (at least, the Sun and SGI dialects of FORTRAN-77) has a feature
which allows allocating arrays with <CODE>malloc</CODE>, but which avoids
blurring the line between arrays and pointers the way that C does. In
stabs such a variable uses the <SAMP>`b'</SAMP> symbol descriptor.
</P><P>
For example, the Fortran declarations
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>real foo, foo10(10), foo10_5(10,5)
pointer (foop, foo)
pointer (foo10p, foo10)
pointer (foo105p, foo10_5)
</pre></td></tr></table></P><P>
produce the stabs
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>foo:b6
foo10:bar3;1;10;6
foo10_5:bar3;1;5;ar3;1;10;6
</pre></td></tr></table></P><P>
In this example, <CODE>real</CODE> is type 6 and type 3 is an integral type
which is the type of the subscripts of the array (probably
<CODE>integer</CODE>).
</P><P>
The <SAMP>`b'</SAMP> symbol descriptor is like <SAMP>`V'</SAMP> in that it denotes a
statically allocated symbol whose scope is local to a function; see
See section <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>. The value of the symbol, instead of being the address
of the variable itself, is the address of a pointer to that variable.
So in the above example, the value of the <CODE>foo</CODE> stab is the address
of a pointer to a real, the value of the <CODE>foo10</CODE> stab is the
address of a pointer to a 10-element array of reals, and the value of
the <CODE>foo10_5</CODE> stab is the address of a pointer to a 5-element array
of 10-element arrays of reals.
</P><P>
<A NAME="Parameters"></A>
<HR SIZE="6">
<A NAME="SEC24"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC23"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC25"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 4.7 Parameters </H2>
<!--docid::SEC24::-->
<P>
Formal parameters to a function are represented by a stab (or sometimes
two; see below) for each parameter. The stabs are in the order in which
the debugger should print the parameters (i.e., the order in which the
parameters are declared in the source file). The exact form of the stab
depends on how the parameter is being passed.
</P><P>
<A NAME="IDX44"></A>
<A NAME="IDX45"></A>
Parameters passed on the stack use the symbol descriptor <SAMP>`p'</SAMP> and
the <CODE>N_PSYM</CODE> symbol type (or <CODE>C_PSYM</CODE> for XCOFF). The value
of the symbol is an offset used to locate the parameter on the stack;
its exact meaning is machine-dependent, but on most machines it is an
offset from the frame pointer.
</P><P>
As a simple example, the code:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>main (argc, argv)
int argc;
char **argv;
</pre></td></tr></table></P><P>
produces the stabs:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "main:F1",36,0,0,_main # 36 is N_FUN
.stabs "argc:p1",160,0,0,68 # 160 is N_PSYM
.stabs "argv:p20=*21=*2",160,0,0,72
</pre></td></tr></table></P><P>
The type definition of <CODE>argv</CODE> is interesting because it contains
several type definitions. Type 21 is pointer to type 2 (char) and
<CODE>argv</CODE> (type 20) is pointer to type 21.
</P><P>
The following symbol descriptors are also said to go with <CODE>N_PSYM</CODE>.
The value of the symbol is said to be an offset from the argument
pointer (I'm not sure whether this is true or not).
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>pP (&#60;&#60;??&#62;&#62;)
pF Fortran function parameter
X (function result variable)
</pre></td></tr></table></P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC26">4.7.2 Storing Parameters as Local Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC27">4.7.3 Passing Parameters by Reference</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_4.html#SEC28">4.7.4 Passing Conformant Array Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Register Parameters"></A>
<HR SIZE="6">
<A NAME="SEC25"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC26"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 4.7.1 Passing Parameters in Registers </H3>
<!--docid::SEC25::-->
<P>
If the parameter is passed in a register, then traditionally there are
two symbols for each argument:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "arg:p1" . . . ; N_PSYM
.stabs "arg:r1" . . . ; N_RSYM
</pre></td></tr></table></P><P>
Debuggers use the second one to find the value, and the first one to
know that it is an argument.
</P><P>
<A NAME="IDX46"></A>
<A NAME="IDX47"></A>
Because that approach is kind of ugly, some compilers use symbol
descriptor <SAMP>`P'</SAMP> or <SAMP>`R'</SAMP> to indicate an argument which is in a
register. Symbol type <CODE>C_RPSYM</CODE> is used in XCOFF and <CODE>N_RSYM</CODE>
is used otherwise. The symbol's value is the register number. <SAMP>`P'</SAMP>
and <SAMP>`R'</SAMP> mean the same thing; the difference is that <SAMP>`P'</SAMP> is a
GNU invention and <SAMP>`R'</SAMP> is an IBM (XCOFF) invention. As of version
4.9, GDB should handle either one.
</P><P>
There is at least one case where GCC uses a <SAMP>`p'</SAMP> and <SAMP>`r'</SAMP> pair
rather than <SAMP>`P'</SAMP>; this is where the argument is passed in the
argument list and then loaded into a register.
</P><P>
According to the AIX documentation, symbol descriptor <SAMP>`D'</SAMP> is for a
parameter passed in a floating point register. This seems
unnecessary--why not just use <SAMP>`R'</SAMP> with a register number which
indicates that it's a floating point register? I haven't verified
whether the system actually does what the documentation indicates.
</P><P>
On the sparc and hppa, for a <SAMP>`P'</SAMP> symbol whose type is a structure
or union, the register contains the address of the structure. On the
sparc, this is also true of a <SAMP>`p'</SAMP> and <SAMP>`r'</SAMP> pair (using Sun
<CODE>cc</CODE>) or a <SAMP>`p'</SAMP> symbol. However, if a (small) structure is
really in a register, <SAMP>`r'</SAMP> is used. And, to top it all off, on the
hppa it might be a structure which was passed on the stack and loaded
into a register and for which there is a <SAMP>`p'</SAMP> and <SAMP>`r'</SAMP> pair! I
believe that symbol descriptor <SAMP>`i'</SAMP> is supposed to deal with this
case (it is said to mean "value parameter by reference, indirect
access"; I don't know the source for this information), but I don't know
details or what compilers or debuggers use it, if any (not GDB or GCC).
It is not clear to me whether this case needs to be dealt with
differently than parameters passed by reference (see section <A HREF="stabs_4.html#SEC27">4.7.3 Passing Parameters by Reference</A>).
</P><P>
<A NAME="Local Variable Parameters"></A>
<HR SIZE="6">
<A NAME="SEC26"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC25"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC27"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC27"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 4.7.2 Storing Parameters as Local Variables </H3>
<!--docid::SEC26::-->
<P>
There is a case similar to an argument in a register, which is an
argument that is actually stored as a local variable. Sometimes this
happens when the argument was passed in a register and then the compiler
stores it as a local variable. If possible, the compiler should claim
that it's in a register, but this isn't always done.
</P><P>
If a parameter is passed as one type and converted to a smaller type by
the prologue (for example, the parameter is declared as a <CODE>float</CODE>,
but the calling conventions specify that it is passed as a
<CODE>double</CODE>), then GCC2 (sometimes) uses a pair of symbols. The first
symbol uses symbol descriptor <SAMP>`p'</SAMP> and the type which is passed.
The second symbol has the type and location which the parameter actually
has after the prologue. For example, suppose the following C code
appears with no prototypes involved:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>void
subr (f)
float f;
{
</pre></td></tr></table></P><P>
if <CODE>f</CODE> is passed as a double at stack offset 8, and the prologue
converts it to a float in register number 0, then the stabs look like:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "f:p13",160,0,3,8 # 160 is <CODE>N_PSYM</CODE>, here 13 is <CODE>double</CODE>
.stabs "f:r12",64,0,3,0 # 64 is <CODE>N_RSYM</CODE>, here 12 is <CODE>float</CODE>
</pre></td></tr></table></P><P>
In both stabs 3 is the line number where <CODE>f</CODE> is declared
(see section <A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A>).
</P><P>
<A NAME="IDX48"></A>
GCC, at least on the 960, has another solution to the same problem. It
uses a single <SAMP>`p'</SAMP> symbol descriptor for an argument which is stored
as a local variable but uses <CODE>N_LSYM</CODE> instead of <CODE>N_PSYM</CODE>. In
this case, the value of the symbol is an offset relative to the local
variables for that function, not relative to the arguments; on some
machines those are the same thing, but not on all.
</P><P>
On the VAX or on other machines in which the calling convention includes
the number of words of arguments actually passed, the debugger (GDB at
least) uses the parameter symbols to keep track of whether it needs to
print nameless arguments in addition to the formal parameters which it
has printed because each one has a stab. For example, in
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>extern int fprintf (FILE *stream, char *format, <small>...</small>);
<small>...</small>
fprintf (stdout, "%d\n", x);
</pre></td></tr></table></P><P>
there are stabs for <CODE>stream</CODE> and <CODE>format</CODE>. On most machines,
the debugger can only print those two arguments (because it has no way
of knowing that additional arguments were passed), but on the VAX or
other machines with a calling convention which indicates the number of
words of arguments, the debugger can print all three arguments. To do
so, the parameter symbol (symbol descriptor <SAMP>`p'</SAMP>) (not necessarily
<SAMP>`r'</SAMP> or symbol descriptor omitted symbols) needs to contain the
actual type as passed (for example, <CODE>double</CODE> not <CODE>float</CODE> if it
is passed as a double and converted to a float).
</P><P>
<A NAME="Reference Parameters"></A>
<HR SIZE="6">
<A NAME="SEC27"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC26"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC28"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC28"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 4.7.3 Passing Parameters by Reference </H3>
<!--docid::SEC27::-->
<P>
If the parameter is passed by reference (e.g., Pascal <CODE>VAR</CODE>
parameters), then the symbol descriptor is <SAMP>`v'</SAMP> if it is in the
argument list, or <SAMP>`a'</SAMP> if it in a register. Other than the fact
that these contain the address of the parameter rather than the
parameter itself, they are identical to <SAMP>`p'</SAMP> and <SAMP>`R'</SAMP>,
respectively. I believe <SAMP>`a'</SAMP> is an AIX invention; <SAMP>`v'</SAMP> is
supported by all stabs-using systems as far as I know.
</P><P>
<A NAME="Conformant Arrays"></A>
<HR SIZE="6">
<A NAME="SEC28"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC27"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC24"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 4.7.4 Passing Conformant Array Parameters </H3>
<!--docid::SEC28::-->
<P>
Conformant arrays are a feature of Modula-2, and perhaps other
languages, in which the size of an array parameter is not known to the
called function until run-time. Such parameters have two stabs: a
<SAMP>`x'</SAMP> for the array itself, and a <SAMP>`C'</SAMP>, which represents the size
of the array. The value of the <SAMP>`x'</SAMP> stab is the offset in the
argument list where the address of the array is stored (it this right?
it is a guess); the value of the <SAMP>`C'</SAMP> stab is the offset in the
argument list where the size of the array (in elements? in bytes?) is
stored.
</P><P>
<A NAME="Types"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_4.html#SEC17"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC29"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,346 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Symbol Tables</TITLE>
<META NAME="description" CONTENT="STABS: Symbol Tables">
<META NAME="keywords" CONTENT="STABS: Symbol Tables">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC46"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_5.html#SEC45"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC47"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 6. Symbol Information in Symbol Tables </H1>
<!--docid::SEC46::-->
<P>
This chapter describes the format of symbol table entries
and how stab assembler directives map to them. It also describes the
transformations that the assembler and linker make on data from stabs.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC47">6.1 Symbol Table Format</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC48">6.2 Transformations on Symbol Tables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Symbol Table Format"></A>
<HR SIZE="6">
<A NAME="SEC47"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC48"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 6.1 Symbol Table Format </H2>
<!--docid::SEC47::-->
<P>
Each time the assembler encounters a stab directive, it puts
each field of the stab into a corresponding field in a symbol table
entry of its output file. If the stab contains a string field, the
symbol table entry for that stab points to a string table entry
containing the string data from the stab. Assembler labels become
relocatable addresses. Symbol table entries in a.out have the format:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>struct internal_nlist {
unsigned long n_strx; /* index into string table of name */
unsigned char n_type; /* type of symbol */
unsigned char n_other; /* misc info (usually empty) */
unsigned short n_desc; /* description field */
bfd_vma n_value; /* value of symbol */
};
</pre></td></tr></table></P><P>
If the stab has a string, the <CODE>n_strx</CODE> field holds the offset in
bytes of the string within the string table. The string is terminated
by a NUL character. If the stab lacks a string (for example, it was
produced by a <CODE>.stabn</CODE> or <CODE>.stabd</CODE> directive), the
<CODE>n_strx</CODE> field is zero.
</P><P>
Symbol table entries with <CODE>n_type</CODE> field values greater than 0x1f
originated as stabs generated by the compiler (with one random
exception). The other entries were placed in the symbol table of the
executable by the assembler or the linker.
</P><P>
<A NAME="Transformations On Symbol Tables"></A>
<HR SIZE="6">
<A NAME="SEC48"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC47"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC49"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 6.2 Transformations on Symbol Tables </H2>
<!--docid::SEC48::-->
<P>
The linker concatenates object files and does fixups of externally
defined symbols.
</P><P>
You can see the transformations made on stab data by the assembler and
linker by examining the symbol table after each pass of the build. To
do this, use <SAMP>`nm -ap'</SAMP>, which dumps the symbol table, including
debugging information, unsorted. For stab entries the columns are:
<VAR>value</VAR>, <VAR>other</VAR>, <VAR>desc</VAR>, <VAR>type</VAR>, <VAR>string</VAR>. For
assembler and linker symbols, the columns are: <VAR>value</VAR>, <VAR>type</VAR>,
<VAR>string</VAR>.
</P><P>
The low 5 bits of the stab type tell the linker how to relocate the
value of the stab. Thus for stab types like <CODE>N_RSYM</CODE> and
<CODE>N_LSYM</CODE>, where the value is an offset or a register number, the
low 5 bits are <CODE>N_ABS</CODE>, which tells the linker not to relocate the
value.
</P><P>
Where the value of a stab contains an assembly language label,
it is transformed by each build step. The assembler turns it into a
relocatable address and the linker turns it into an absolute address.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC49">6.2.1 Transformations on Static Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC50">6.2.2 Transformations on Global Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_6.html#SEC51">6.2.3 Transformations of Stabs in separate sections</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">For some object file formats,
things are a bit different.</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Transformations On Static Variables"></A>
<HR SIZE="6">
<A NAME="SEC49"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC48"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC50"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC48"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 6.2.1 Transformations on Static Variables </H3>
<!--docid::SEC49::-->
<P>
This source line defines a static variable at file scope:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>static int s_g_repeat
</pre></td></tr></table></P><P>
The following stab describes the symbol:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "s_g_repeat:S1",38,0,0,_s_g_repeat
</pre></td></tr></table></P><P>
The assembler transforms the stab into this symbol table entry in the
<TT>`.o'</TT> file. The location is expressed as a data segment offset.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>00000084 - 00 0000 STSYM s_g_repeat:S1
</pre></td></tr></table></P><P>
In the symbol table entry from the executable, the linker has made the
relocatable address absolute.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>0000e00c - 00 0000 STSYM s_g_repeat:S1
</pre></td></tr></table></P><P>
<A NAME="Transformations On Global Variables"></A>
<HR SIZE="6">
<A NAME="SEC50"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC49"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC51"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC51"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC48"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 6.2.2 Transformations on Global Variables </H3>
<!--docid::SEC50::-->
<P>
Stabs for global variables do not contain location information. In
this case, the debugger finds location information in the assembler or
linker symbol table entry describing the variable. The source line:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>char g_foo = 'c';
</pre></td></tr></table></P><P>
generates the stab:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.stabs "g_foo:G2",32,0,0,0
</pre></td></tr></table></P><P>
The variable is represented by two symbol table entries in the object
file (see below). The first one originated as a stab. The second one
is an external symbol. The upper case <SAMP>`D'</SAMP> signifies that the
<CODE>n_type</CODE> field of the symbol table contains 7, <CODE>N_DATA</CODE> with
local linkage. The stab's value is zero since the value is not used for
<CODE>N_GSYM</CODE> stabs. The value of the linker symbol is the relocatable
address corresponding to the variable.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>00000000 - 00 0000 GSYM g_foo:G2
00000080 D _g_foo
</pre></td></tr></table></P><P>
These entries as transformed by the linker. The linker symbol table
entry now holds an absolute address:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>00000000 - 00 0000 GSYM g_foo:G2
<small>...</small>
0000e008 D _g_foo
</pre></td></tr></table></P><P>
<A NAME="Stab Section Transformations"></A>
<HR SIZE="6">
<A NAME="SEC51"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC50"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC48"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 6.2.3 Transformations of Stabs in separate sections </H3>
<!--docid::SEC51::-->
<P>
For object file formats using stabs in separate sections (see section <A HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>), use <CODE>objdump --stabs</CODE> instead of <CODE>nm</CODE> to show the
stabs in an object or executable file. <CODE>objdump</CODE> is a GNU utility;
Sun does not provide any equivalent.
</P><P>
The following example is for a stab whose value is an address is
relative to the compilation unit (see section <A HREF="stabs_13.html#SEC89">F.2 Having the Linker Relocate Stabs in ELF</A>). For
example, if the source line
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>static int ld = 5;
</pre></td></tr></table></P><P>
appears within a function, then the assembly language output from the
compiler contains:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>.Ddata.data:
<small>...</small>
.stabs "ld:V(0,3)",0x26,0,4,.L18-Ddata.data # 0x26 is N_STSYM
<small>...</small>
.L18:
.align 4
.word 0x5
</pre></td></tr></table></P><P>
Because the value is formed by subtracting one symbol from another, the
value is absolute, not relocatable, and so the object file contains
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>Symnum n_type n_othr n_desc n_value n_strx String
31 STSYM 0 4 00000004 680 ld:V(0,3)
</pre></td></tr></table></P><P>
without any relocations, and the executable file also contains
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=example><pre>Symnum n_type n_othr n_desc n_value n_strx String
31 STSYM 0 4 00000004 680 ld:V(0,3)
</pre></td></tr></table></P><P>
<A NAME="Cplusplus"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_6.html#SEC46"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,389 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Stab Types</TITLE>
<META NAME="description" CONTENT="STABS: Stab Types">
<META NAME="keywords" CONTENT="STABS: Stab Types">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC67"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC66"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC68"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_7.html#SEC52"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> A. Table of Stab Types </H1>
<!--docid::SEC67::-->
<P>
The following are all the possible values for the stab type field, for
a.out files, in numeric order. This does not apply to XCOFF, but
it does apply to stabs in sections (see section <A HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>). Stabs in
ECOFF use these values but add 0x8f300 to distinguish them from non-stab
symbols.
</P><P>
The symbolic names are defined in the file <TT>`include/aout/stabs.def'</TT>.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_8.html#SEC68">A.1 Non-Stab Symbol Types</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Types from 0 to 0x1f</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="stabs_8.html#SEC69">A.2 Stab Symbol Types</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Types from 0x20 to 0xff</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Non-Stab Symbol Types"></A>
<HR SIZE="6">
<A NAME="SEC68"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC69"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> A.1 Non-Stab Symbol Types </H2>
<!--docid::SEC68::-->
<P>
The following types are used by the linker and assembler, not by stab
directives. Since this document does not attempt to describe aspects of
object file format other than the debugging format, no details are
given.
</P><P>
<DL COMPACT>
<DT><CODE>0x0 N_UNDF</CODE>
<DD>Undefined symbol
<P>
<DT><CODE>0x2 N_ABS</CODE>
<DD>File scope absolute symbol
<P>
<DT><CODE>0x3 N_ABS | N_EXT</CODE>
<DD>External absolute symbol
<P>
<DT><CODE>0x4 N_TEXT</CODE>
<DD>File scope text symbol
<P>
<DT><CODE>0x5 N_TEXT | N_EXT</CODE>
<DD>External text symbol
<P>
<DT><CODE>0x6 N_DATA</CODE>
<DD>File scope data symbol
<P>
<DT><CODE>0x7 N_DATA | N_EXT</CODE>
<DD>External data symbol
<P>
<DT><CODE>0x8 N_BSS</CODE>
<DD>File scope BSS symbol
<P>
<DT><CODE>0x9 N_BSS | N_EXT</CODE>
<DD>External BSS symbol
<P>
<DT><CODE>0x0c N_FN_SEQ</CODE>
<DD>Same as <CODE>N_FN</CODE>, for Sequent compilers
<P>
<DT><CODE>0x0a N_INDR</CODE>
<DD>Symbol is indirected to another symbol
<P>
<DT><CODE>0x12 N_COMM</CODE>
<DD>Common--visible after shared library dynamic link
<P>
<DT><CODE>0x14 N_SETA</CODE>
<DD><DT><CODE>0x15 N_SETA | N_EXT</CODE>
<DD>Absolute set element
<P>
<DT><CODE>0x16 N_SETT</CODE>
<DD><DT><CODE>0x17 N_SETT | N_EXT</CODE>
<DD>Text segment set element
<P>
<DT><CODE>0x18 N_SETD</CODE>
<DD><DT><CODE>0x19 N_SETD | N_EXT</CODE>
<DD>Data segment set element
<P>
<DT><CODE>0x1a N_SETB</CODE>
<DD><DT><CODE>0x1b N_SETB | N_EXT</CODE>
<DD>BSS segment set element
<P>
<DT><CODE>0x1c N_SETV</CODE>
<DD><DT><CODE>0x1d N_SETV | N_EXT</CODE>
<DD>Pointer to set vector
<P>
<DT><CODE>0x1e N_WARNING</CODE>
<DD>Print a warning message during linking
<P>
<DT><CODE>0x1f N_FN</CODE>
<DD>File name of a <TT>`.o'</TT> file
</DL>
<P>
<A NAME="Stab Symbol Types"></A>
<HR SIZE="6">
<A NAME="SEC69"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC68"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> A.2 Stab Symbol Types </H2>
<!--docid::SEC69::-->
<P>
The following symbol types indicate that this is a stab. This is the
full list of stab numbers, including stab types that are used in
languages other than C.
</P><P>
<DL COMPACT>
<DT><CODE>0x20 N_GSYM</CODE>
<DD>Global symbol; see <A HREF="stabs_4.html#SEC19">4.2 Global Variables</A>.
<P>
<DT><CODE>0x22 N_FNAME</CODE>
<DD>Function name (for BSD Fortran); see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>.
<P>
<DT><CODE>0x24 N_FUN</CODE>
<DD>Function name (see section <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>) or text segment variable
(see section <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>).
<P>
<DT><CODE>0x26 N_STSYM</CODE>
<DD>Data segment file-scope variable; see <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>.
<P>
<DT><CODE>0x28 N_LCSYM</CODE>
<DD>BSS segment file-scope variable; see <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>.
<P>
<DT><CODE>0x2a N_MAIN</CODE>
<DD>Name of main routine; see <A HREF="stabs_2.html#SEC8">2.1 Main Program</A>.
<P>
<DT><CODE>0x2c N_ROSYM</CODE>
<DD>Variable in <CODE>.rodata</CODE> section; see <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>.
<P>
<DT><CODE>0x30 N_PC</CODE>
<DD>Global symbol (for Pascal); see <A HREF="stabs_11.html#SEC73">D.1 N_PC</A>.
<P>
<DT><CODE>0x32 N_NSYMS</CODE>
<DD>Number of symbols (according to Ultrix V4.0); see <A HREF="stabs_11.html#SEC74">D.2 N_NSYMS</A>.
<P>
<DT><CODE>0x34 N_NOMAP</CODE>
<DD>No DST map; see <A HREF="stabs_11.html#SEC75">D.3 N_NOMAP</A>.
<P>
<DT><CODE>0x38 N_OBJ</CODE>
<DD>Object file (Solaris2).
<P>
<DT><CODE>0x3c N_OPT</CODE>
<DD>Debugger options (Solaris2).
<P>
<DT><CODE>0x40 N_RSYM</CODE>
<DD>Register variable; see <A HREF="stabs_4.html#SEC20">4.3 Register Variables</A>.
<P>
<DT><CODE>0x42 N_M2C</CODE>
<DD>Modula-2 compilation unit; see <A HREF="stabs_11.html#SEC76">D.4 N_M2C</A>.
<P>
<DT><CODE>0x44 N_SLINE</CODE>
<DD>Line number in text segment; see <A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A>.
<P>
<DT><CODE>0x46 N_DSLINE</CODE>
<DD>Line number in data segment; see <A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A>.
<P>
<DT><CODE>0x48 N_BSLINE</CODE>
<DD>Line number in bss segment; see <A HREF="stabs_2.html#SEC11">2.4 Line Numbers</A>.
<P>
<DT><CODE>0x48 N_BROWS</CODE>
<DD>Sun source code browser, path to <TT>`.cb'</TT> file; see <A HREF="stabs_11.html#SEC77">D.5 N_BROWS</A>.
<P>
<DT><CODE>0x4a N_DEFD</CODE>
<DD>GNU Modula2 definition module dependency; see <A HREF="stabs_11.html#SEC78">D.6 N_DEFD</A>.
<P>
<DT><CODE>0x4c N_FLINE</CODE>
<DD>Function start/body/end line numbers (Solaris2).
<P>
<DT><CODE>0x50 N_EHDECL</CODE>
<DD>GNU C++ exception variable; see <A HREF="stabs_11.html#SEC79">D.7 N_EHDECL</A>.
<P>
<DT><CODE>0x50 N_MOD2</CODE>
<DD>Modula2 info "for imc" (according to Ultrix V4.0); see <A HREF="stabs_11.html#SEC80">D.8 N_MOD2</A>.
<P>
<DT><CODE>0x54 N_CATCH</CODE>
<DD>GNU C++ <CODE>catch</CODE> clause; see <A HREF="stabs_11.html#SEC81">D.9 N_CATCH</A>.
<P>
<DT><CODE>0x60 N_SSYM</CODE>
<DD>Structure of union element; see <A HREF="stabs_11.html#SEC82">D.10 N_SSYM</A>.
<P>
<DT><CODE>0x62 N_ENDM</CODE>
<DD>Last stab for module (Solaris2).
<P>
<DT><CODE>0x64 N_SO</CODE>
<DD>Path and name of source file; see <A HREF="stabs_2.html#SEC9">2.2 Paths and Names of the Source Files</A>.
<P>
<DT><CODE>0x80 N_LSYM</CODE>
<DD>Stack variable (see section <A HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A>) or type (see section <A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A>).
<P>
<DT><CODE>0x82 N_BINCL</CODE>
<DD>Beginning of an include file (Sun only); see <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>.
<P>
<DT><CODE>0x84 N_SOL</CODE>
<DD>Name of include file; see <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>.
<P>
<DT><CODE>0xa0 N_PSYM</CODE>
<DD>Parameter variable; see <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>.
<P>
<DT><CODE>0xa2 N_EINCL</CODE>
<DD>End of an include file; see <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>.
<P>
<DT><CODE>0xa4 N_ENTRY</CODE>
<DD>Alternate entry point; see <A HREF="stabs_2.html#SEC15">2.8 Alternate Entry Points</A>.
<P>
<DT><CODE>0xc0 N_LBRAC</CODE>
<DD>Beginning of a lexical block; see <A HREF="stabs_2.html#SEC14">2.7 Block Structure</A>.
<P>
<DT><CODE>0xc2 N_EXCL</CODE>
<DD>Place holder for a deleted include file; see <A HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>.
<P>
<DT><CODE>0xc4 N_SCOPE</CODE>
<DD>Modula2 scope information (Sun linker); see <A HREF="stabs_11.html#SEC83">D.11 N_SCOPE</A>.
<P>
<DT><CODE>0xe0 N_RBRAC</CODE>
<DD>End of a lexical block; see <A HREF="stabs_2.html#SEC14">2.7 Block Structure</A>.
<P>
<DT><CODE>0xe2 N_BCOMM</CODE>
<DD>Begin named common block; see <A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A>.
<P>
<DT><CODE>0xe4 N_ECOMM</CODE>
<DD>End named common block; see <A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A>.
<P>
<DT><CODE>0xe8 N_ECOML</CODE>
<DD>Member of a common block; see <A HREF="stabs_4.html#SEC21">4.4 Common Blocks</A>.
<P>
<DT><CODE>0xea N_WITH</CODE>
<DD>Pascal <CODE>with</CODE> statement: type,,0,0,offset (Solaris2).
<P>
<DT><CODE>0xf0 N_NBTEXT</CODE>
<DD>Gould non-base registers; see <A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>.
<P>
<DT><CODE>0xf2 N_NBDATA</CODE>
<DD>Gould non-base registers; see <A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>.
<P>
<DT><CODE>0xf4 N_NBBSS</CODE>
<DD>Gould non-base registers; see <A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>.
<P>
<DT><CODE>0xf6 N_NBSTS</CODE>
<DD>Gould non-base registers; see <A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>.
<P>
<DT><CODE>0xf8 N_NBLCS</CODE>
<DD>Gould non-base registers; see <A HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>.
</DL>
<P>
<A NAME="Symbol Descriptors"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC67"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_9.html#SEC70"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,200 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 13 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Symbol Descriptors</TITLE>
<META NAME="description" CONTENT="STABS: Symbol Descriptors">
<META NAME="keywords" CONTENT="STABS: Symbol Descriptors">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC70"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_8.html#SEC69"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> B. Table of Symbol Descriptors </H1>
<!--docid::SEC70::-->
<P>
The symbol descriptor is the character which follows the colon in many
stabs, and which tells what kind of stab it is. See section <A HREF="stabs_1.html#SEC4">1.3 The String Field</A>,
for more information about their use.
</P><P>
<DL COMPACT>
<DT><CODE><VAR>digit</VAR></CODE>
<DD><DT><CODE>(</CODE>
<DD><DT><CODE>-</CODE>
<DD>Variable on the stack; see <A HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A>.
<P>
<DT><CODE>:</CODE>
<DD>C++ nested symbol; see See section <A HREF="stabs_7.html#SEC54">7.2 Defining a Symbol Within Another Type</A>.
<P>
<DT><CODE>a</CODE>
<DD>Parameter passed by reference in register; see <A HREF="stabs_4.html#SEC27">4.7.3 Passing Parameters by Reference</A>.
<P>
<DT><CODE>b</CODE>
<DD>Based variable; see <A HREF="stabs_4.html#SEC23">4.6 Fortran Based Variables</A>.
<P>
<DT><CODE>c</CODE>
<DD>Constant; see <A HREF="stabs_3.html#SEC16">3. Constants</A>.
<P>
<DT><CODE>C</CODE>
<DD>Conformant array bound (Pascal, maybe other languages); <A HREF="stabs_4.html#SEC28">4.7.4 Passing Conformant Array Parameters</A>. Name of a caught exception (GNU C++). These can be
distinguished because the latter uses <CODE>N_CATCH</CODE> and the former uses
another symbol type.
<P>
<DT><CODE>d</CODE>
<DD>Floating point register variable; see <A HREF="stabs_4.html#SEC20">4.3 Register Variables</A>.
<P>
<DT><CODE>D</CODE>
<DD>Parameter in floating point register; see <A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A>.
<P>
<DT><CODE>f</CODE>
<DD>File scope function; see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>.
<P>
<DT><CODE>F</CODE>
<DD>Global function; see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>.
<P>
<DT><CODE>G</CODE>
<DD>Global variable; see <A HREF="stabs_4.html#SEC19">4.2 Global Variables</A>.
<P>
<DT><CODE>i</CODE>
<DD>See section <A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A>.
<P>
<DT><CODE>I</CODE>
<DD>Internal (nested) procedure; see <A HREF="stabs_2.html#SEC13">2.6 Nested Procedures</A>.
<P>
<DT><CODE>J</CODE>
<DD>Internal (nested) function; see <A HREF="stabs_2.html#SEC13">2.6 Nested Procedures</A>.
<P>
<DT><CODE>L</CODE>
<DD>Label name (documented by AIX, no further information known).
<P>
<DT><CODE>m</CODE>
<DD>Module; see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>.
<P>
<DT><CODE>p</CODE>
<DD>Argument list parameter; see <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>.
<P>
<DT><CODE>pP</CODE>
<DD>See section <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>.
<P>
<DT><CODE>pF</CODE>
<DD>Fortran Function parameter; see <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>.
<P>
<DT><CODE>P</CODE>
<DD>Unfortunately, three separate meanings have been independently invented
for this symbol descriptor. At least the GNU and Sun uses can be
distinguished by the symbol type. Global Procedure (AIX) (symbol type
used unknown); see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>. Register parameter (GNU) (symbol
type <CODE>N_PSYM</CODE>); see <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>. Prototype of function
referenced by this file (Sun <CODE>acc</CODE>) (symbol type <CODE>N_FUN</CODE>).
<P>
<DT><CODE>Q</CODE>
<DD>Static Procedure; see <A HREF="stabs_2.html#SEC12">2.5 Procedures</A>.
<P>
<DT><CODE>R</CODE>
<DD>Register parameter; see <A HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A>.
<P>
<DT><CODE>r</CODE>
<DD>Register variable; see <A HREF="stabs_4.html#SEC20">4.3 Register Variables</A>.
<P>
<DT><CODE>S</CODE>
<DD>File scope variable; see <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>.
<P>
<DT><CODE>s</CODE>
<DD>Local variable (OS9000).
<P>
<DT><CODE>t</CODE>
<DD>Type name; see <A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A>.
<P>
<DT><CODE>T</CODE>
<DD>Enumeration, structure, or union tag; see <A HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A>.
<P>
<DT><CODE>v</CODE>
<DD>Parameter passed by reference; see <A HREF="stabs_4.html#SEC27">4.7.3 Passing Parameters by Reference</A>.
<P>
<DT><CODE>V</CODE>
<DD>Procedure scope static variable; see <A HREF="stabs_4.html#SEC22">4.5 Static Variables</A>.
<P>
<DT><CODE>x</CODE>
<DD>Conformant array; see <A HREF="stabs_4.html#SEC28">4.7.4 Passing Conformant Array Parameters</A>.
<P>
<DT><CODE>X</CODE>
<DD>Function return variable; see <A HREF="stabs_4.html#SEC24">4.7 Parameters</A>.
</DL>
<P>
<A NAME="Type Descriptors"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_10.html#SEC71"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 13 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,220 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: About this document</TITLE>
<META NAME="description" CONTENT="STABS: About this document">
<META NAME="keywords" CONTENT="STABS: About this document">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC_About"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>About this document</H1>
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
<P></P>
The buttons in the navigation panels have the following meaning:
<P></P>
<table border = "1">
<TR>
<TH> Button </TH>
<TH> Name </TH>
<TH> Go to </TH>
<TH> From 1.2.3 go to</TH>
</TR>
<TR>
<TD ALIGN="CENTER">
[ &lt; ] </TD>
<TD ALIGN="CENTER">
Back
</TD>
<TD>
previous section in reading order
</TD>
<TD>
1.2.2
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[ &gt; ] </TD>
<TD ALIGN="CENTER">
Forward
</TD>
<TD>
next section in reading order
</TD>
<TD>
1.2.4
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[ &lt;&lt; ] </TD>
<TD ALIGN="CENTER">
FastBack
</TD>
<TD>
previous or up-and-previous section
</TD>
<TD>
1.1
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[ Up ] </TD>
<TD ALIGN="CENTER">
Up
</TD>
<TD>
up section
</TD>
<TD>
1.2
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[ &gt;&gt; ] </TD>
<TD ALIGN="CENTER">
FastForward
</TD>
<TD>
next or up-and-next section
</TD>
<TD>
1.3
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[Top] </TD>
<TD ALIGN="CENTER">
Top
</TD>
<TD>
cover (top) of document
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[Contents] </TD>
<TD ALIGN="CENTER">
Contents
</TD>
<TD>
table of contents
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[Index] </TD>
<TD ALIGN="CENTER">
Index
</TD>
<TD>
concept index
</TD>
<TD>
&nbsp;
</TD>
</TR>
<TR>
<TD ALIGN="CENTER">
[ ? ] </TD>
<TD ALIGN="CENTER">
About
</TD>
<TD>
this page
</TD>
<TD>
&nbsp;
</TD>
</TR>
</TABLE>
<P></P>
where the <STRONG> Example </STRONG> assumes that the current position
is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
the following structure:
<UL>
<LI> 1. Section One </LI>
<UL>
<LI>1.1 Subsection One-One</LI>
<UL>
<LI> ... </LI>
</UL>
<LI>1.2 Subsection One-Two</LI>
<UL>
<LI>1.2.1 Subsubsection One-Two-One
</LI><LI>1.2.2 Subsubsection One-Two-Two
</LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
&lt;== Current Position </STRONG>
</LI><LI>1.2.4 Subsubsection One-Two-Four
</LI></UL>
<LI>1.3 Subsection One-Three</LI>
<UL>
<LI> ... </LI>
</UL>
<LI>1.4 Subsection One-Four</LI>
</UL>
</UL>
<HR SIZE=1>
<BR>
<FONT SIZE="-1">
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,93 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Short Table of Contents</TITLE>
<META NAME="description" CONTENT="STABS: Short Table of Contents">
<META NAME="keywords" CONTENT="STABS: Short Table of Contents">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC_OVERVIEW"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>Short Table of Contents</H1>
<BLOCKQUOTE>
<A NAME="TOC1" HREF="stabs_1.html#SEC1">1. Overview of Stabs</A>
<BR>
<A NAME="TOC7" HREF="stabs_2.html#SEC7">2. Encoding the Structure of the Program</A>
<BR>
<A NAME="TOC16" HREF="stabs_3.html#SEC16">3. Constants</A>
<BR>
<A NAME="TOC17" HREF="stabs_4.html#SEC17">4. Variables</A>
<BR>
<A NAME="TOC29" HREF="stabs_5.html#SEC29">5. Defining Types</A>
<BR>
<A NAME="TOC46" HREF="stabs_6.html#SEC46">6. Symbol Information in Symbol Tables</A>
<BR>
<A NAME="TOC52" HREF="stabs_7.html#SEC52">7. GNU C++ Stabs</A>
<BR>
<A NAME="TOC67" HREF="stabs_8.html#SEC67">A. Table of Stab Types</A>
<BR>
<A NAME="TOC70" HREF="stabs_9.html#SEC70">B. Table of Symbol Descriptors</A>
<BR>
<A NAME="TOC71" HREF="stabs_10.html#SEC71">C. Table of Type Descriptors</A>
<BR>
<A NAME="TOC72" HREF="stabs_11.html#SEC72">D. Expanded Reference by Stab Type</A>
<BR>
<A NAME="TOC86" HREF="stabs_12.html#SEC86">E. Questions and Anomalies</A>
<BR>
<A NAME="TOC87" HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>
<BR>
<A NAME="TOC90" HREF="stabs_14.html#SEC90">Symbol Types Index</A>
<BR>
</BLOCKQUOTE>
<HR SIZE=1>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>

View File

@@ -0,0 +1,270 @@
<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on March, 28 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>STABS: Table of Contents</TITLE>
<META NAME="description" CONTENT="STABS: Table of Contents">
<META NAME="keywords" CONTENT="STABS: Table of Contents">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC_Contents"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_14.html#SEC90">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="stabs_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1>Table of Contents</H1>
<UL>
<A NAME="TOC1" HREF="stabs_1.html#SEC1">1. Overview of Stabs</A>
<BR>
<UL>
<A NAME="TOC2" HREF="stabs_1.html#SEC2">1.1 Overview of Debugging Information Flow</A>
<BR>
<A NAME="TOC3" HREF="stabs_1.html#SEC3">1.2 Overview of Stab Format</A>
<BR>
<A NAME="TOC4" HREF="stabs_1.html#SEC4">1.3 The String Field</A>
<BR>
<A NAME="TOC5" HREF="stabs_1.html#SEC5">1.4 A Simple Example in C Source</A>
<BR>
<A NAME="TOC6" HREF="stabs_1.html#SEC6">1.5 The Simple Example at the Assembly Level</A>
<BR>
</UL>
<A NAME="TOC7" HREF="stabs_2.html#SEC7">2. Encoding the Structure of the Program</A>
<BR>
<UL>
<A NAME="TOC8" HREF="stabs_2.html#SEC8">2.1 Main Program</A>
<BR>
<A NAME="TOC9" HREF="stabs_2.html#SEC9">2.2 Paths and Names of the Source Files</A>
<BR>
<A NAME="TOC10" HREF="stabs_2.html#SEC10">2.3 Names of Include Files</A>
<BR>
<A NAME="TOC11" HREF="stabs_2.html#SEC11">2.4 Line Numbers</A>
<BR>
<A NAME="TOC12" HREF="stabs_2.html#SEC12">2.5 Procedures</A>
<BR>
<A NAME="TOC13" HREF="stabs_2.html#SEC13">2.6 Nested Procedures</A>
<BR>
<A NAME="TOC14" HREF="stabs_2.html#SEC14">2.7 Block Structure</A>
<BR>
<A NAME="TOC15" HREF="stabs_2.html#SEC15">2.8 Alternate Entry Points</A>
<BR>
</UL>
<A NAME="TOC16" HREF="stabs_3.html#SEC16">3. Constants</A>
<BR>
<A NAME="TOC17" HREF="stabs_4.html#SEC17">4. Variables</A>
<BR>
<UL>
<A NAME="TOC18" HREF="stabs_4.html#SEC18">4.1 Automatic Variables Allocated on the Stack</A>
<BR>
<A NAME="TOC19" HREF="stabs_4.html#SEC19">4.2 Global Variables</A>
<BR>
<A NAME="TOC20" HREF="stabs_4.html#SEC20">4.3 Register Variables</A>
<BR>
<A NAME="TOC21" HREF="stabs_4.html#SEC21">4.4 Common Blocks</A>
<BR>
<A NAME="TOC22" HREF="stabs_4.html#SEC22">4.5 Static Variables</A>
<BR>
<A NAME="TOC23" HREF="stabs_4.html#SEC23">4.6 Fortran Based Variables</A>
<BR>
<A NAME="TOC24" HREF="stabs_4.html#SEC24">4.7 Parameters</A>
<BR>
<UL>
<A NAME="TOC25" HREF="stabs_4.html#SEC25">4.7.1 Passing Parameters in Registers</A>
<BR>
<A NAME="TOC26" HREF="stabs_4.html#SEC26">4.7.2 Storing Parameters as Local Variables</A>
<BR>
<A NAME="TOC27" HREF="stabs_4.html#SEC27">4.7.3 Passing Parameters by Reference</A>
<BR>
<A NAME="TOC28" HREF="stabs_4.html#SEC28">4.7.4 Passing Conformant Array Parameters</A>
<BR>
</UL>
</UL>
<A NAME="TOC29" HREF="stabs_5.html#SEC29">5. Defining Types</A>
<BR>
<UL>
<A NAME="TOC30" HREF="stabs_5.html#SEC30">5.1 Builtin Types</A>
<BR>
<UL>
<A NAME="TOC31" HREF="stabs_5.html#SEC31">5.1.1 Traditional Builtin Types</A>
<BR>
<UL>
<A NAME="TOC32" HREF="stabs_5.html#SEC32">5.1.1.1 Traditional Integer Types</A>
<BR>
<A NAME="TOC33" HREF="stabs_5.html#SEC33">5.1.1.2 Traditional Other Types</A>
<BR>
</UL>
<A NAME="TOC34" HREF="stabs_5.html#SEC34">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</A>
<BR>
<A NAME="TOC35" HREF="stabs_5.html#SEC35">5.1.3 Negative Type Numbers</A>
<BR>
</UL>
<A NAME="TOC36" HREF="stabs_5.html#SEC36">5.2 Miscellaneous Types</A>
<BR>
<A NAME="TOC37" HREF="stabs_5.html#SEC37">5.3 Cross-References to Other Types</A>
<BR>
<A NAME="TOC38" HREF="stabs_5.html#SEC38">5.4 Subrange Types</A>
<BR>
<A NAME="TOC39" HREF="stabs_5.html#SEC39">5.5 Array Types</A>
<BR>
<A NAME="TOC40" HREF="stabs_5.html#SEC40">5.6 Strings</A>
<BR>
<A NAME="TOC41" HREF="stabs_5.html#SEC41">5.7 Enumerations</A>
<BR>
<A NAME="TOC42" HREF="stabs_5.html#SEC42">5.8 Structures</A>
<BR>
<A NAME="TOC43" HREF="stabs_5.html#SEC43">5.9 Giving a Type a Name</A>
<BR>
<A NAME="TOC44" HREF="stabs_5.html#SEC44">5.10 Unions</A>
<BR>
<A NAME="TOC45" HREF="stabs_5.html#SEC45">5.11 Function Types</A>
<BR>
</UL>
<A NAME="TOC46" HREF="stabs_6.html#SEC46">6. Symbol Information in Symbol Tables</A>
<BR>
<UL>
<A NAME="TOC47" HREF="stabs_6.html#SEC47">6.1 Symbol Table Format</A>
<BR>
<A NAME="TOC48" HREF="stabs_6.html#SEC48">6.2 Transformations on Symbol Tables</A>
<BR>
<UL>
<A NAME="TOC49" HREF="stabs_6.html#SEC49">6.2.1 Transformations on Static Variables</A>
<BR>
<A NAME="TOC50" HREF="stabs_6.html#SEC50">6.2.2 Transformations on Global Variables</A>
<BR>
<A NAME="TOC51" HREF="stabs_6.html#SEC51">6.2.3 Transformations of Stabs in separate sections</A>
<BR>
</UL>
</UL>
<A NAME="TOC52" HREF="stabs_7.html#SEC52">7. GNU C++ Stabs</A>
<BR>
<UL>
<A NAME="TOC53" HREF="stabs_7.html#SEC53">7.1 C++ Class Names</A>
<BR>
<A NAME="TOC54" HREF="stabs_7.html#SEC54">7.2 Defining a Symbol Within Another Type</A>
<BR>
<A NAME="TOC55" HREF="stabs_7.html#SEC55">7.3 Basic Types For C++</A>
<BR>
<A NAME="TOC56" HREF="stabs_7.html#SEC56">7.4 Simple Class Definition</A>
<BR>
<A NAME="TOC57" HREF="stabs_7.html#SEC57">7.5 Class Instance</A>
<BR>
<A NAME="TOC58" HREF="stabs_7.html#SEC58">7.6 Method Definition</A>
<BR>
<A NAME="TOC59" HREF="stabs_7.html#SEC59">7.7 The <SAMP>`#'</SAMP> Type Descriptor</A>
<BR>
<A NAME="TOC60" HREF="stabs_7.html#SEC60">7.8 The <SAMP>`@'</SAMP> Type Descriptor</A>
<BR>
<A NAME="TOC61" HREF="stabs_7.html#SEC61">7.9 Protections</A>
<BR>
<A NAME="TOC62" HREF="stabs_7.html#SEC62">7.10 Method Modifiers (<CODE>const</CODE>, <CODE>volatile</CODE>, <CODE>const volatile</CODE>)</A>
<BR>
<A NAME="TOC63" HREF="stabs_7.html#SEC63">7.11 Virtual Methods</A>
<BR>
<A NAME="TOC64" HREF="stabs_7.html#SEC64">7.12 Inheritance</A>
<BR>
<A NAME="TOC65" HREF="stabs_7.html#SEC65">7.13 Virtual Base Classes</A>
<BR>
<A NAME="TOC66" HREF="stabs_7.html#SEC66">7.14 Static Members</A>
<BR>
</UL>
<A NAME="TOC67" HREF="stabs_8.html#SEC67">A. Table of Stab Types</A>
<BR>
<UL>
<A NAME="TOC68" HREF="stabs_8.html#SEC68">A.1 Non-Stab Symbol Types</A>
<BR>
<A NAME="TOC69" HREF="stabs_8.html#SEC69">A.2 Stab Symbol Types</A>
<BR>
</UL>
<A NAME="TOC70" HREF="stabs_9.html#SEC70">B. Table of Symbol Descriptors</A>
<BR>
<A NAME="TOC71" HREF="stabs_10.html#SEC71">C. Table of Type Descriptors</A>
<BR>
<A NAME="TOC72" HREF="stabs_11.html#SEC72">D. Expanded Reference by Stab Type</A>
<BR>
<UL>
<A NAME="TOC73" HREF="stabs_11.html#SEC73">D.1 N_PC</A>
<BR>
<A NAME="TOC74" HREF="stabs_11.html#SEC74">D.2 N_NSYMS</A>
<BR>
<A NAME="TOC75" HREF="stabs_11.html#SEC75">D.3 N_NOMAP</A>
<BR>
<A NAME="TOC76" HREF="stabs_11.html#SEC76">D.4 N_M2C</A>
<BR>
<A NAME="TOC77" HREF="stabs_11.html#SEC77">D.5 N_BROWS</A>
<BR>
<A NAME="TOC78" HREF="stabs_11.html#SEC78">D.6 N_DEFD</A>
<BR>
<A NAME="TOC79" HREF="stabs_11.html#SEC79">D.7 N_EHDECL</A>
<BR>
<A NAME="TOC80" HREF="stabs_11.html#SEC80">D.8 N_MOD2</A>
<BR>
<A NAME="TOC81" HREF="stabs_11.html#SEC81">D.9 N_CATCH</A>
<BR>
<A NAME="TOC82" HREF="stabs_11.html#SEC82">D.10 N_SSYM</A>
<BR>
<A NAME="TOC83" HREF="stabs_11.html#SEC83">D.11 N_SCOPE</A>
<BR>
<A NAME="TOC84" HREF="stabs_11.html#SEC84">D.12 Non-base registers on Gould systems</A>
<BR>
<A NAME="TOC85" HREF="stabs_11.html#SEC85">D.13 N_LENG</A>
<BR>
</UL>
<A NAME="TOC86" HREF="stabs_12.html#SEC86">E. Questions and Anomalies</A>
<BR>
<A NAME="TOC87" HREF="stabs_13.html#SEC87">F. Using Stabs in Their Own Sections</A>
<BR>
<UL>
<A NAME="TOC88" HREF="stabs_13.html#SEC88">F.1 How to Embed Stabs in Sections</A>
<BR>
<A NAME="TOC89" HREF="stabs_13.html#SEC89">F.2 Having the Linker Relocate Stabs in ELF</A>
<BR>
</UL>
<A NAME="TOC90" HREF="stabs_14.html#SEC90">Symbol Types Index</A>
<BR>
</UL>
<HR SIZE=1>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>March, 28 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>