You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
154 lines
6.5 KiB
HTML
154 lines
6.5 KiB
HTML
4 years ago
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||
|
<html>
|
||
|
<!-- Copyright (C) 1992-2019 Free Software Foundation, Inc.
|
||
|
Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
|
||
|
and David MacKenzie.
|
||
|
|
||
|
Permission is granted to copy, distribute and/or modify this document
|
||
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||
|
any later version published by the Free Software Foundation; with no
|
||
|
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
||
|
Texts. A copy of the license is included in the section entitled "GNU
|
||
|
Free Documentation License". -->
|
||
|
<!-- Created by GNU Texinfo 6.4, http://www.gnu.org/software/texinfo/ -->
|
||
|
<head>
|
||
|
<title>Source Files (STABS)</title>
|
||
|
|
||
|
<meta name="description" content="Source Files (STABS)">
|
||
|
<meta name="keywords" content="Source Files (STABS)">
|
||
|
<meta name="resource-type" content="document">
|
||
|
<meta name="distribution" content="global">
|
||
|
<meta name="Generator" content="makeinfo">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<link href="index.html#Top" rel="start" title="Top">
|
||
|
<link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
|
||
|
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
|
||
|
<link href="Program-Structure.html#Program-Structure" rel="up" title="Program Structure">
|
||
|
<link href="Include-Files.html#Include-Files" rel="next" title="Include Files">
|
||
|
<link href="Main-Program.html#Main-Program" rel="prev" title="Main Program">
|
||
|
<style type="text/css">
|
||
|
<!--
|
||
|
a.summary-letter {text-decoration: none}
|
||
|
blockquote.indentedblock {margin-right: 0em}
|
||
|
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
|
||
|
blockquote.smallquotation {font-size: smaller}
|
||
|
div.display {margin-left: 3.2em}
|
||
|
div.example {margin-left: 3.2em}
|
||
|
div.lisp {margin-left: 3.2em}
|
||
|
div.smalldisplay {margin-left: 3.2em}
|
||
|
div.smallexample {margin-left: 3.2em}
|
||
|
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.nolinebreak {white-space: nowrap}
|
||
|
span.roman {font-family: initial; font-weight: normal}
|
||
|
span.sansserif {font-family: sans-serif; font-weight: normal}
|
||
|
ul.no-bullet {list-style: none}
|
||
|
-->
|
||
|
</style>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body lang="en">
|
||
|
<a name="Source-Files"></a>
|
||
|
<div class="header">
|
||
|
<p>
|
||
|
Next: <a href="Include-Files.html#Include-Files" accesskey="n" rel="next">Include Files</a>, Previous: <a href="Main-Program.html#Main-Program" accesskey="p" rel="prev">Main Program</a>, Up: <a href="Program-Structure.html#Program-Structure" accesskey="u" rel="up">Program Structure</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
|
||
|
</div>
|
||
|
<hr>
|
||
|
<a name="Paths-and-Names-of-the-Source-Files"></a>
|
||
|
<h3 class="section">2.2 Paths and Names of the Source Files</h3>
|
||
|
|
||
|
<a name="index-N_005fSO"></a>
|
||
|
<p>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>Some compilers use the desc field to indicate the language of the
|
||
|
source file. Sun’s compilers started this usage, and the first
|
||
|
constants are derived from their documentation. Languages added
|
||
|
by gcc/gdb start at 0x32 to avoid conflict with languages Sun may
|
||
|
add in the future. A desc field with a value 0 indicates that no
|
||
|
language has been specified via this mechanism.
|
||
|
</p>
|
||
|
<dl compact="compact">
|
||
|
<dt><code>N_SO_AS</code> (0x1)</dt>
|
||
|
<dd><p>Assembly language
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_C</code> (0x2)</dt>
|
||
|
<dd><p>K&R traditional C
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_ANSI_C</code> (0x3)</dt>
|
||
|
<dd><p>ANSI C
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_CC</code> (0x4)</dt>
|
||
|
<dd><p>C++
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_FORTRAN</code> (0x5)</dt>
|
||
|
<dd><p>Fortran
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_PASCAL</code> (0x6)</dt>
|
||
|
<dd><p>Pascal
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_FORTRAN90</code> (0x7)</dt>
|
||
|
<dd><p>Fortran90
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_OBJC</code> (0x32)</dt>
|
||
|
<dd><p>Objective-C
|
||
|
</p></dd>
|
||
|
<dt><code>N_SO_OBJCPLUS</code> (0x33)</dt>
|
||
|
<dd><p>Objective-C++
|
||
|
</p></dd>
|
||
|
</dl>
|
||
|
|
||
|
<p>Some compilers (for example, GCC2 and SunOS4 <samp>/bin/cc</samp>) 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<tt>++</tt> 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>
|
||
|
<div class="example">
|
||
|
<pre class="example">.stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # <span class="roman">100 is N_SO</span>
|
||
|
.stabs "hello.c",100,0,0,Ltext0
|
||
|
.text
|
||
|
Ltext0:
|
||
|
</pre></div>
|
||
|
|
||
|
<a name="index-C_005fFILE"></a>
|
||
|
<p>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>
|
||
|
<hr>
|
||
|
<div class="header">
|
||
|
<p>
|
||
|
Next: <a href="Include-Files.html#Include-Files" accesskey="n" rel="next">Include Files</a>, Previous: <a href="Main-Program.html#Main-Program" accesskey="p" rel="prev">Main Program</a>, Up: <a href="Program-Structure.html#Program-Structure" accesskey="u" rel="up">Program Structure</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
</body>
|
||
|
</html>
|