toolchain/gcc-linaro-6.3.1-2017.02-x8.../share/doc/gdb/stabs/index.html

267 lines
19 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 1992-2017 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
and David MacKenzie.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled "GNU
Free Documentation License". -->
<!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
<head>
<title>STABS: Top</title>
<meta name="description" content="STABS: Top">
<meta name="keywords" content="STABS: Top">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="#Top" rel="start" title="Top">
<link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
<link href="#SEC_Contents" rel="contents" title="Table of Contents">
<link href="../dir/index.html" rel="up" title="(dir)">
<link href="Overview.html#Overview" rel="next" title="Overview">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<h1 class="settitle" align="center">STABS</h1>
<p>This document describes the stabs debugging symbol tables.
</p>
<p>Copyright &copy; 1992-2017 Free Software Foundation, Inc.
Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
and David MacKenzie.
</p>
<p>Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
Texts. A copy of the license is included in the section entitled &ldquo;GNU
Free Documentation License&rdquo;.
</p>
<a name="Top"></a>
<div class="header">
<p>
Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="The-_0022stabs_0022-representation-of-debugging-information"></a>
<h1 class="top">The &quot;stabs&quot; representation of debugging information</h1>
<p>This document describes the stabs debugging format.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="Overview.html#Overview" accesskey="1">Overview</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Overview of stabs
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Program-Structure.html#Program-Structure" accesskey="2">Program Structure</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">&bull; <a href="Constants.html#Constants" accesskey="3">Constants</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Constants
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Variables.html#Variables" accesskey="4">Variables</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Types.html#Types" accesskey="5">Types</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Type definitions
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Macro-define-and-undefine.html#Macro-define-and-undefine" accesskey="6">Macro define and undefine</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Representation of #define and #undef
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Symbol-Tables.html#Symbol-Tables" accesskey="7">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">&bull; <a href="Cplusplus.html#Cplusplus" accesskey="8">Cplusplus</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Stabs specific to C++
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Stab-Types.html#Stab-Types" accesskey="9">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">&bull; <a href="Symbol-Descriptors.html#Symbol-Descriptors">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">&bull; <a href="Type-Descriptors.html#Type-Descriptors">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">&bull; <a href="Expanded-Reference.html#Expanded-Reference">Expanded Reference</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Reference information by stab type
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Questions.html#Questions">Questions</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Questions and anomalies
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Stab-Sections.html#Stab-Sections">Stab 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">&bull; <a href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">GNU Free Documentation License</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">The license for this documentation
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Symbol-Types-Index.html#Symbol-Types-Index">Symbol Types Index</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">Index of symbolic stab symbol type names.
</td></tr>
</table>
<a name="SEC_Contents"></a>
<h2 class="contents-heading">Table of Contents</h2>
<div class="contents">
<ul class="no-bullet">
<li><a name="toc-Overview-of-Stabs" href="Overview.html#Overview">1 Overview of Stabs</a>
<ul class="no-bullet">
<li><a name="toc-Overview-of-Debugging-Information-Flow" href="Flow.html#Flow">1.1 Overview of Debugging Information Flow</a></li>
<li><a name="toc-Overview-of-Stab-Format" href="Stabs-Format.html#Stabs-Format">1.2 Overview of Stab Format</a></li>
<li><a name="toc-The-String-Field" href="String-Field.html#String-Field">1.3 The String Field</a></li>
<li><a name="toc-A-Simple-Example-in-C-Source" href="C-Example.html#C-Example">1.4 A Simple Example in C Source</a></li>
<li><a name="toc-The-Simple-Example-at-the-Assembly-Level" href="Assembly-Code.html#Assembly-Code">1.5 The Simple Example at the Assembly Level</a></li>
</ul></li>
<li><a name="toc-Encoding-the-Structure-of-the-Program" href="Program-Structure.html#Program-Structure">2 Encoding the Structure of the Program</a>
<ul class="no-bullet">
<li><a name="toc-Main-Program-1" href="Main-Program.html#Main-Program">2.1 Main Program</a></li>
<li><a name="toc-Paths-and-Names-of-the-Source-Files" href="Source-Files.html#Source-Files">2.2 Paths and Names of the Source Files</a></li>
<li><a name="toc-Names-of-Include-Files" href="Include-Files.html#Include-Files">2.3 Names of Include Files</a></li>
<li><a name="toc-Line-Numbers-1" href="Line-Numbers.html#Line-Numbers">2.4 Line Numbers</a></li>
<li><a name="toc-Procedures-1" href="Procedures.html#Procedures">2.5 Procedures</a></li>
<li><a name="toc-Nested-Procedures-1" href="Nested-Procedures.html#Nested-Procedures">2.6 Nested Procedures</a></li>
<li><a name="toc-Block-Structure-1" href="Block-Structure.html#Block-Structure">2.7 Block Structure</a></li>
<li><a name="toc-Alternate-Entry-Points-1" href="Alternate-Entry-Points.html#Alternate-Entry-Points">2.8 Alternate Entry Points</a></li>
</ul></li>
<li><a name="toc-Constants-1" href="Constants.html#Constants">3 Constants</a></li>
<li><a name="toc-Variables-1" href="Variables.html#Variables">4 Variables</a>
<ul class="no-bullet">
<li><a name="toc-Automatic-Variables-Allocated-on-the-Stack" href="Stack-Variables.html#Stack-Variables">4.1 Automatic Variables Allocated on the Stack</a></li>
<li><a name="toc-Global-Variables-1" href="Global-Variables.html#Global-Variables">4.2 Global Variables</a></li>
<li><a name="toc-Register-Variables-1" href="Register-Variables.html#Register-Variables">4.3 Register Variables</a></li>
<li><a name="toc-Common-Blocks-1" href="Common-Blocks.html#Common-Blocks">4.4 Common Blocks</a></li>
<li><a name="toc-Static-Variables" href="Statics.html#Statics">4.5 Static Variables</a></li>
<li><a name="toc-Fortran-Based-Variables" href="Based-Variables.html#Based-Variables">4.6 Fortran Based Variables</a></li>
<li><a name="toc-Parameters-1" href="Parameters.html#Parameters">4.7 Parameters</a>
<ul class="no-bullet">
<li><a name="toc-Passing-Parameters-in-Registers" href="Register-Parameters.html#Register-Parameters">4.7.1 Passing Parameters in Registers</a></li>
<li><a name="toc-Storing-Parameters-as-Local-Variables" href="Local-Variable-Parameters.html#Local-Variable-Parameters">4.7.2 Storing Parameters as Local Variables</a></li>
<li><a name="toc-Passing-Parameters-by-Reference" href="Reference-Parameters.html#Reference-Parameters">4.7.3 Passing Parameters by Reference</a></li>
<li><a name="toc-Passing-Conformant-Array-Parameters" href="Conformant-Arrays.html#Conformant-Arrays">4.7.4 Passing Conformant Array Parameters</a></li>
</ul></li>
</ul></li>
<li><a name="toc-Defining-Types" href="Types.html#Types">5 Defining Types</a>
<ul class="no-bullet">
<li><a name="toc-Builtin-Types-1" href="Builtin-Types.html#Builtin-Types">5.1 Builtin Types</a>
<ul class="no-bullet">
<li><a name="toc-Traditional-Builtin-Types-1" href="Traditional-Builtin-Types.html#Traditional-Builtin-Types">5.1.1 Traditional Builtin Types</a>
<ul class="no-bullet">
<li><a name="toc-Traditional-Integer-Types-1" href="Traditional-Integer-Types.html#Traditional-Integer-Types">5.1.1.1 Traditional Integer Types</a></li>
<li><a name="toc-Traditional-Other-Types-1" href="Traditional-Other-Types.html#Traditional-Other-Types">5.1.1.2 Traditional Other Types</a></li>
</ul></li>
<li><a name="toc-Defining-Builtin-Types-Using-Builtin-Type-Descriptors" href="Builtin-Type-Descriptors.html#Builtin-Type-Descriptors">5.1.2 Defining Builtin Types Using Builtin Type Descriptors</a></li>
<li><a name="toc-Negative-Type-Numbers-1" href="Negative-Type-Numbers.html#Negative-Type-Numbers">5.1.3 Negative Type Numbers</a></li>
</ul></li>
<li><a name="toc-Miscellaneous-Types-1" href="Miscellaneous-Types.html#Miscellaneous-Types">5.2 Miscellaneous Types</a></li>
<li><a name="toc-Cross_002dReferences-to-Other-Types" href="Cross_002dReferences.html#Cross_002dReferences">5.3 Cross-References to Other Types</a></li>
<li><a name="toc-Subrange-Types" href="Subranges.html#Subranges">5.4 Subrange Types</a></li>
<li><a name="toc-Array-Types" href="Arrays.html#Arrays">5.5 Array Types</a></li>
<li><a name="toc-Strings-1" href="Strings.html#Strings">5.6 Strings</a></li>
<li><a name="toc-Enumerations-1" href="Enumerations.html#Enumerations">5.7 Enumerations</a></li>
<li><a name="toc-Structures-1" href="Structures.html#Structures">5.8 Structures</a></li>
<li><a name="toc-Giving-a-Type-a-Name" href="Typedefs.html#Typedefs">5.9 Giving a Type a Name</a></li>
<li><a name="toc-Unions-1" href="Unions.html#Unions">5.10 Unions</a></li>
<li><a name="toc-Function-Types-1" href="Function-Types.html#Function-Types">5.11 Function Types</a></li>
</ul></li>
<li><a name="toc-Representation-of-_0023define-and-_0023undef" href="Macro-define-and-undefine.html#Macro-define-and-undefine">6 Representation of #define and #undef</a></li>
<li><a name="toc-Symbol-Information-in-Symbol-Tables" href="Symbol-Tables.html#Symbol-Tables">7 Symbol Information in Symbol Tables</a>
<ul class="no-bullet">
<li><a name="toc-Symbol-Table-Format-1" href="Symbol-Table-Format.html#Symbol-Table-Format">7.1 Symbol Table Format</a></li>
<li><a name="toc-Transformations-on-Symbol-Tables" href="Transformations-On-Symbol-Tables.html#Transformations-On-Symbol-Tables">7.2 Transformations on Symbol Tables</a>
<ul class="no-bullet">
<li><a name="toc-Transformations-on-Static-Variables" href="Transformations-On-Static-Variables.html#Transformations-On-Static-Variables">7.2.1 Transformations on Static Variables</a></li>
<li><a name="toc-Transformations-on-Global-Variables" href="Transformations-On-Global-Variables.html#Transformations-On-Global-Variables">7.2.2 Transformations on Global Variables</a></li>
<li><a name="toc-Transformations-of-Stabs-in-separate-sections" href="Stab-Section-Transformations.html#Stab-Section-Transformations">7.2.3 Transformations of Stabs in separate sections</a></li>
</ul></li>
</ul></li>
<li><a name="toc-GNU-C_002b_002b-Stabs" href="Cplusplus.html#Cplusplus">8 GNU C<tt>++</tt> Stabs</a>
<ul class="no-bullet">
<li><a name="toc-C_002b_002b-Class-Names" href="Class-Names.html#Class-Names">8.1 C<tt>++</tt> Class Names</a></li>
<li><a name="toc-Defining-a-Symbol-Within-Another-Type" href="Nested-Symbols.html#Nested-Symbols">8.2 Defining a Symbol Within Another Type</a></li>
<li><a name="toc-Basic-Types-For-C_002b_002b" href="Basic-Cplusplus-Types.html#Basic-Cplusplus-Types">8.3 Basic Types For C<tt>++</tt></a></li>
<li><a name="toc-Simple-Class-Definition" href="Simple-Classes.html#Simple-Classes">8.4 Simple Class Definition</a></li>
<li><a name="toc-Class-Instance-1" href="Class-Instance.html#Class-Instance">8.5 Class Instance</a></li>
<li><a name="toc-Method-Definition" href="Methods.html#Methods">8.6 Method Definition</a></li>
<li><a name="toc-The-_0023-Type-Descriptor" href="Method-Type-Descriptor.html#Method-Type-Descriptor">8.7 The &lsquo;<samp>#</samp>&rsquo; Type Descriptor</a></li>
<li><a name="toc-The-_0040-Type-Descriptor" href="Member-Type-Descriptor.html#Member-Type-Descriptor">8.8 The &lsquo;<samp>@</samp>&rsquo; Type Descriptor</a></li>
<li><a name="toc-Protections-1" href="Protections.html#Protections">8.9 Protections</a></li>
<li><a name="toc-Method-Modifiers-_0028const_002c-volatile_002c-const-volatile_0029" href="Method-Modifiers.html#Method-Modifiers">8.10 Method Modifiers (<code>const</code>, <code>volatile</code>, <code>const volatile</code>)</a></li>
<li><a name="toc-Virtual-Methods-1" href="Virtual-Methods.html#Virtual-Methods">8.11 Virtual Methods</a></li>
<li><a name="toc-Inheritance-1" href="Inheritance.html#Inheritance">8.12 Inheritance</a></li>
<li><a name="toc-Virtual-Base-Classes-1" href="Virtual-Base-Classes.html#Virtual-Base-Classes">8.13 Virtual Base Classes</a></li>
<li><a name="toc-Static-Members-1" href="Static-Members.html#Static-Members">8.14 Static Members</a></li>
</ul></li>
<li><a name="toc-Table-of-Stab-Types" href="Stab-Types.html#Stab-Types">Appendix A Table of Stab Types</a>
<ul class="no-bullet">
<li><a name="toc-Non_002dStab-Symbol-Types-1" href="Non_002dStab-Symbol-Types.html#Non_002dStab-Symbol-Types">A.1 Non-Stab Symbol Types</a></li>
<li><a name="toc-Stab-Symbol-Types-1" href="Stab-Symbol-Types.html#Stab-Symbol-Types">A.2 Stab Symbol Types</a></li>
</ul></li>
<li><a name="toc-Table-of-Symbol-Descriptors" href="Symbol-Descriptors.html#Symbol-Descriptors">Appendix B Table of Symbol Descriptors</a></li>
<li><a name="toc-Table-of-Type-Descriptors" href="Type-Descriptors.html#Type-Descriptors">Appendix C Table of Type Descriptors</a></li>
<li><a name="toc-Expanded-Reference-by-Stab-Type" href="Expanded-Reference.html#Expanded-Reference">Appendix D Expanded Reference by Stab Type</a>
<ul class="no-bullet">
<li><a name="toc-N_005fPC-1" href="N_005fPC.html#N_005fPC">D.1 N_PC</a></li>
<li><a name="toc-N_005fNSYMS-1" href="N_005fNSYMS.html#N_005fNSYMS">D.2 N_NSYMS</a></li>
<li><a name="toc-N_005fNOMAP-1" href="N_005fNOMAP.html#N_005fNOMAP">D.3 N_NOMAP</a></li>
<li><a name="toc-N_005fM2C-1" href="N_005fM2C.html#N_005fM2C">D.4 N_M2C</a></li>
<li><a name="toc-N_005fBROWS-1" href="N_005fBROWS.html#N_005fBROWS">D.5 N_BROWS</a></li>
<li><a name="toc-N_005fDEFD-1" href="N_005fDEFD.html#N_005fDEFD">D.6 N_DEFD</a></li>
<li><a name="toc-N_005fEHDECL-1" href="N_005fEHDECL.html#N_005fEHDECL">D.7 N_EHDECL</a></li>
<li><a name="toc-N_005fMOD2-1" href="N_005fMOD2.html#N_005fMOD2">D.8 N_MOD2</a></li>
<li><a name="toc-N_005fCATCH-1" href="N_005fCATCH.html#N_005fCATCH">D.9 N_CATCH</a></li>
<li><a name="toc-N_005fSSYM-1" href="N_005fSSYM.html#N_005fSSYM">D.10 N_SSYM</a></li>
<li><a name="toc-N_005fSCOPE-1" href="N_005fSCOPE.html#N_005fSCOPE">D.11 N_SCOPE</a></li>
<li><a name="toc-Non_002dbase-registers-on-Gould-systems" href="Gould.html#Gould">D.12 Non-base registers on Gould systems</a></li>
<li><a name="toc-N_005fLENG-1" href="N_005fLENG.html#N_005fLENG">D.13 N_LENG</a></li>
</ul></li>
<li><a name="toc-Questions-and-Anomalies" href="Questions.html#Questions">Appendix E Questions and Anomalies</a></li>
<li><a name="toc-Using-Stabs-in-Their-Own-Sections" href="Stab-Sections.html#Stab-Sections">Appendix F Using Stabs in Their Own Sections</a>
<ul class="no-bullet">
<li><a name="toc-How-to-Embed-Stabs-in-Sections" href="Stab-Section-Basics.html#Stab-Section-Basics">F.1 How to Embed Stabs in Sections</a></li>
<li><a name="toc-Having-the-Linker-Relocate-Stabs-in-ELF" href="ELF-Linker-Relocation.html#ELF-Linker-Relocation">F.2 Having the Linker Relocate Stabs in ELF</a></li>
</ul></li>
<li><a name="toc-GNU-Free-Documentation-License-1" href="GNU-Free-Documentation-License.html#GNU-Free-Documentation-License">Appendix G GNU Free Documentation License</a></li>
<li><a name="toc-Symbol-Types-Index-1" href="Symbol-Types-Index.html#Symbol-Types-Index">Symbol Types Index</a></li>
</ul>
</div>
<hr>
<div class="header">
<p>
Next: <a href="Overview.html#Overview" accesskey="n" rel="next">Overview</a>, Up: <a href="../dir/index.html" accesskey="u" rel="up">(dir)</a> &nbsp; [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>