Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

154 Zeilen
6.5KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1992-2020 Free Software Foundation, Inc.
  4. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
  5. and David MacKenzie.
  6. Permission is granted to copy, distribute and/or modify this document
  7. under the terms of the GNU Free Documentation License, Version 1.3 or
  8. any later version published by the Free Software Foundation; with no
  9. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  10. Texts. A copy of the license is included in the section entitled "GNU
  11. Free Documentation License". -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Source Files (STABS)</title>
  16. <meta name="description" content="Source Files (STABS)">
  17. <meta name="keywords" content="Source Files (STABS)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="Program-Structure.html#Program-Structure" rel="up" title="Program Structure">
  25. <link href="Include-Files.html#Include-Files" rel="next" title="Include Files">
  26. <link href="Main-Program.html#Main-Program" rel="prev" title="Main Program">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Source-Files"></a>
  57. <div class="header">
  58. <p>
  59. 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> &nbsp; [<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>
  60. </div>
  61. <hr>
  62. <a name="Paths-and-Names-of-the-Source-Files"></a>
  63. <h3 class="section">2.2 Paths and Names of the Source Files</h3>
  64. <a name="index-N_005fSO"></a>
  65. <p>Before any other stabs occur, there must be a stab specifying the source
  66. file. This information is contained in a symbol of stab type
  67. <code>N_SO</code>; the string field contains the name of the file. The
  68. value of the symbol is the start address of the portion of the
  69. text section corresponding to that file.
  70. </p>
  71. <p>Some compilers use the desc field to indicate the language of the
  72. source file. Sun&rsquo;s compilers started this usage, and the first
  73. constants are derived from their documentation. Languages added
  74. by gcc/gdb start at 0x32 to avoid conflict with languages Sun may
  75. add in the future. A desc field with a value 0 indicates that no
  76. language has been specified via this mechanism.
  77. </p>
  78. <dl compact="compact">
  79. <dt><code>N_SO_AS</code> (0x1)</dt>
  80. <dd><p>Assembly language
  81. </p></dd>
  82. <dt><code>N_SO_C</code> (0x2)</dt>
  83. <dd><p>K&amp;R traditional C
  84. </p></dd>
  85. <dt><code>N_SO_ANSI_C</code> (0x3)</dt>
  86. <dd><p>ANSI C
  87. </p></dd>
  88. <dt><code>N_SO_CC</code> (0x4)</dt>
  89. <dd><p>C++
  90. </p></dd>
  91. <dt><code>N_SO_FORTRAN</code> (0x5)</dt>
  92. <dd><p>Fortran
  93. </p></dd>
  94. <dt><code>N_SO_PASCAL</code> (0x6)</dt>
  95. <dd><p>Pascal
  96. </p></dd>
  97. <dt><code>N_SO_FORTRAN90</code> (0x7)</dt>
  98. <dd><p>Fortran90
  99. </p></dd>
  100. <dt><code>N_SO_OBJC</code> (0x32)</dt>
  101. <dd><p>Objective-C
  102. </p></dd>
  103. <dt><code>N_SO_OBJCPLUS</code> (0x33)</dt>
  104. <dd><p>Objective-C++
  105. </p></dd>
  106. </dl>
  107. <p>Some compilers (for example, GCC2 and SunOS4 <samp>/bin/cc</samp>) also
  108. include the directory in which the source was compiled, in a second
  109. <code>N_SO</code> symbol preceding the one containing the file name. This
  110. symbol can be distinguished by the fact that it ends in a slash. Code
  111. from the <code>cfront</code> C<tt>++</tt> compiler can have additional <code>N_SO</code> symbols for
  112. nonexistent source files after the <code>N_SO</code> for the real source file;
  113. these are believed to contain no useful information.
  114. </p>
  115. <p>For example:
  116. </p>
  117. <div class="example">
  118. <pre class="example">.stabs &quot;/cygint/s1/users/jcm/play/&quot;,100,0,0,Ltext0 # <span class="roman">100 is N_SO</span>
  119. .stabs &quot;hello.c&quot;,100,0,0,Ltext0
  120. .text
  121. Ltext0:
  122. </pre></div>
  123. <a name="index-C_005fFILE"></a>
  124. <p>Instead of <code>N_SO</code> symbols, XCOFF uses a <code>.file</code> assembler
  125. directive which assembles to a <code>C_FILE</code> symbol; explaining this in
  126. detail is outside the scope of this document.
  127. </p>
  128. <p>If it is useful to indicate the end of a source file, this is done with
  129. an <code>N_SO</code> symbol with an empty string for the name. The value is
  130. the address of the end of the text section for the file. For some
  131. systems, there is no indication of the end of a source file, and you
  132. just need to figure it ended when you see an <code>N_SO</code> for a different
  133. source file, or a symbol ending in <code>.o</code> (which at least some
  134. linkers insert to mark the start of a new <code>.o</code> file).
  135. </p>
  136. <hr>
  137. <div class="header">
  138. <p>
  139. 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> &nbsp; [<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>
  140. </div>
  141. </body>
  142. </html>