Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / stabs / Source-Files.html
blob8390d9d1eae798d37796ca47fe4ae13831114211
1 <html lang="en">
2 <head>
3 <title>STABS</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="STABS">
6 <meta name="generator" content="makeinfo 4.3">
7 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Source%20Files">Source Files</a>,
13 Next:<a rel="next" accesskey="n" href="Include-Files.html#Include%20Files">Include Files</a>,
14 Previous:<a rel="previous" accesskey="p" href="Main-Program.html#Main%20Program">Main Program</a>,
15 Up:<a rel="up" accesskey="u" href="Program-Structure.html#Program%20Structure">Program Structure</a>
16 <hr><br>
17 </div>
19 <h3 class="section">Paths and Names of the Source Files</h3>
21 <p>Before any other stabs occur, there must be a stab specifying the source
22 file. This information is contained in a symbol of stab type
23 <code>N_SO</code>; the string field contains the name of the file. The
24 value of the symbol is the start address of the portion of the
25 text section corresponding to that file.
27 <p>With the Sun Solaris2 compiler, the desc field contains a
28 source-language code.
30 <p>Some compilers (for example, GCC2 and SunOS4 <code>/bin/cc</code>) also
31 include the directory in which the source was compiled, in a second
32 <code>N_SO</code> symbol preceding the one containing the file name. This
33 symbol can be distinguished by the fact that it ends in a slash. Code
34 from the <code>cfront</code> C++ compiler can have additional <code>N_SO</code> symbols for
35 nonexistent source files after the <code>N_SO</code> for the real source file;
36 these are believed to contain no useful information.
38 <p>For example:
40 <pre class="example"> .stabs "/cygint/s1/users/jcm/play/",100,0,0,Ltext0 # 100 is N_SO
41 .stabs "hello.c",100,0,0,Ltext0
42 .text
43 Ltext0:
44 </pre>
46 <p>Instead of <code>N_SO</code> symbols, XCOFF uses a <code>.file</code> assembler
47 directive which assembles to a <code>C_FILE</code> symbol; explaining this in
48 detail is outside the scope of this document.
50 <p>If it is useful to indicate the end of a source file, this is done with
51 an <code>N_SO</code> symbol with an empty string for the name. The value is
52 the address of the end of the text section for the file. For some
53 systems, there is no indication of the end of a source file, and you
54 just need to figure it ended when you see an <code>N_SO</code> for a different
55 source file, or a symbol ending in <code>.o</code> (which at least some
56 linkers insert to mark the start of a new <code>.o</code> file).
58 </body></html>