stab.def 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. /* Table of DBX symbol codes for the GNU system.
  2. Copyright (C) 1988-2019 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 3 of the
  7. License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public
  13. License along with the GNU C Library; see the file COPYING3. If
  14. not see <http://www.gnu.org/licenses/>. */
  15. /* This contains contribution from Cygnus Support. */
  16. /* Global variable. Only the name is significant.
  17. To find the address, look in the corresponding external symbol. */
  18. __define_stab (N_GSYM, 0x20, "GSYM")
  19. /* Function name for BSD Fortran. Only the name is significant.
  20. To find the address, look in the corresponding external symbol. */
  21. __define_stab (N_FNAME, 0x22, "FNAME")
  22. /* Function name or text-segment variable for C. Value is its address.
  23. Desc is supposedly starting line number, but GCC doesn't set it
  24. and DBX seems not to miss it. */
  25. __define_stab (N_FUN, 0x24, "FUN")
  26. /* Data-segment variable with internal linkage. Value is its address.
  27. "Static Sym". */
  28. __define_stab (N_STSYM, 0x26, "STSYM")
  29. /* BSS-segment variable with internal linkage. Value is its address. */
  30. __define_stab (N_LCSYM, 0x28, "LCSYM")
  31. /* Begin function marker. */
  32. __define_stab (N_BNSYM, 0x2e, "BNSYM")
  33. /* End function marker. */
  34. __define_stab (N_ENSYM, 0x4e, "ENSYM")
  35. /* Name of main routine. Only the name is significant.
  36. This is not used in C. */
  37. __define_stab (N_MAIN, 0x2a, "MAIN")
  38. /* Global symbol in Pascal.
  39. Supposedly the value is its line number; I'm skeptical. */
  40. __define_stab (N_PC, 0x30, "PC")
  41. /* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */
  42. __define_stab (N_NSYMS, 0x32, "NSYMS")
  43. /* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */
  44. __define_stab (N_NOMAP, 0x34, "NOMAP")
  45. /* New stab from Solaris. I don't know what it means, but it
  46. don't seem to contain useful information. */
  47. __define_stab (N_OBJ, 0x38, "OBJ")
  48. /* New stab from Solaris. I don't know what it means, but it
  49. don't seem to contain useful information. Possibly related to the
  50. optimization flags used in this module. */
  51. __define_stab (N_OPT, 0x3c, "OPT")
  52. /* Register variable. Value is number of register. */
  53. __define_stab (N_RSYM, 0x40, "RSYM")
  54. /* Modula-2 compilation unit. Can someone say what info it contains? */
  55. __define_stab (N_M2C, 0x42, "M2C")
  56. /* Line number in text segment. Desc is the line number;
  57. value is corresponding address. */
  58. __define_stab (N_SLINE, 0x44, "SLINE")
  59. /* Similar, for data segment. */
  60. __define_stab (N_DSLINE, 0x46, "DSLINE")
  61. /* Similar, for bss segment. */
  62. __define_stab (N_BSLINE, 0x48, "BSLINE")
  63. /* Sun's source-code browser stabs. ?? Don't know what the fields are.
  64. Supposedly the field is "path to associated .cb file". THIS VALUE
  65. OVERLAPS WITH N_BSLINE! */
  66. __define_stab (N_BROWS, 0x48, "BROWS")
  67. /* GNU Modula-2 definition module dependency. Value is the modification time
  68. of the definition file. Other is nonzero if it is imported with the
  69. GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there
  70. are enough empty fields? */
  71. __define_stab(N_DEFD, 0x4a, "DEFD")
  72. /* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2
  73. and one is for C++. Still,... */
  74. /* GNU C++ exception variable. Name is variable name. */
  75. __define_stab (N_EHDECL, 0x50, "EHDECL")
  76. /* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */
  77. __define_stab (N_MOD2, 0x50, "MOD2")
  78. /* GNU C++ `catch' clause. Value is its address. Desc is nonzero if
  79. this entry is immediately followed by a CAUGHT stab saying what exception
  80. was caught. Multiple CAUGHT stabs means that multiple exceptions
  81. can be caught here. If Desc is 0, it means all exceptions are caught
  82. here. */
  83. __define_stab (N_CATCH, 0x54, "CATCH")
  84. /* Structure or union element. Value is offset in the structure. */
  85. __define_stab (N_SSYM, 0x60, "SSYM")
  86. /* Name of main source file.
  87. Value is starting text address of the compilation. */
  88. __define_stab (N_SO, 0x64, "SO")
  89. /* Automatic variable in the stack. Value is offset from frame pointer.
  90. Also used for type descriptions. */
  91. __define_stab (N_LSYM, 0x80, "LSYM")
  92. /* Beginning of an include file. Only Sun uses this.
  93. In an object file, only the name is significant.
  94. The Sun linker puts data into some of the other fields. */
  95. __define_stab (N_BINCL, 0x82, "BINCL")
  96. /* Name of sub-source file (#include file).
  97. Value is starting text address of the compilation. */
  98. __define_stab (N_SOL, 0x84, "SOL")
  99. /* Parameter variable. Value is offset from argument pointer.
  100. (On most machines the argument pointer is the same as the frame pointer. */
  101. __define_stab (N_PSYM, 0xa0, "PSYM")
  102. /* End of an include file. No name.
  103. This and N_BINCL act as brackets around the file's output.
  104. In an object file, there is no significant data in this entry.
  105. The Sun linker puts data into some of the fields. */
  106. __define_stab (N_EINCL, 0xa2, "EINCL")
  107. /* Alternate entry point. Value is its address. */
  108. __define_stab (N_ENTRY, 0xa4, "ENTRY")
  109. /* Beginning of lexical block.
  110. The desc is the nesting level in lexical blocks.
  111. The value is the address of the start of the text for the block.
  112. The variables declared inside the block *precede* the N_LBRAC symbol. */
  113. __define_stab (N_LBRAC, 0xc0, "LBRAC")
  114. /* Place holder for deleted include file. Replaces a N_BINCL and everything
  115. up to the corresponding N_EINCL. The Sun linker generates these when
  116. it finds multiple identical copies of the symbols from an include file.
  117. This appears only in output from the Sun linker. */
  118. __define_stab (N_EXCL, 0xc2, "EXCL")
  119. /* Modula-2 scope information. Can someone say what info it contains? */
  120. __define_stab (N_SCOPE, 0xc4, "SCOPE")
  121. /* End of a lexical block. Desc matches the N_LBRAC's desc.
  122. The value is the address of the end of the text for the block. */
  123. __define_stab (N_RBRAC, 0xe0, "RBRAC")
  124. /* Begin named common block. Only the name is significant. */
  125. __define_stab (N_BCOMM, 0xe2, "BCOMM")
  126. /* End named common block. Only the name is significant
  127. (and it should match the N_BCOMM). */
  128. __define_stab (N_ECOMM, 0xe4, "ECOMM")
  129. /* End common (local name): value is address.
  130. I'm not sure how this is used. */
  131. __define_stab (N_ECOML, 0xe8, "ECOML")
  132. /* These STAB's are used on Gould systems for Non-Base register symbols
  133. or something like that. FIXME. I have assigned the values at random
  134. since I don't have a Gould here. Fixups from Gould folk welcome... */
  135. __define_stab (N_NBTEXT, 0xF0, "NBTEXT")
  136. __define_stab (N_NBDATA, 0xF2, "NBDATA")
  137. __define_stab (N_NBBSS, 0xF4, "NBBSS")
  138. __define_stab (N_NBSTS, 0xF6, "NBSTS")
  139. __define_stab (N_NBLCS, 0xF8, "NBLCS")
  140. /* Second symbol entry containing a length-value for the preceding entry.
  141. The value is the length. */
  142. __define_stab (N_LENG, 0xfe, "LENG")
  143. /* The above information, in matrix format.
  144. STAB MATRIX
  145. _________________________________________________
  146. | 00 - 1F are not dbx stab symbols |
  147. | In most cases, the low bit is the EXTernal bit|
  148. | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA |
  149. | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT |
  150. | 08 BSS | 0A INDR | 0C FN_SEQ | 0E |
  151. | 09 |EXT | 0B | 0D | 0F |
  152. | 10 | 12 COMM | 14 SETA | 16 SETT |
  153. | 11 | 13 | 15 | 17 |
  154. | 18 SETD | 1A SETB | 1C SETV | 1E WARNING|
  155. | 19 | 1B | 1D | 1F FN |
  156. |_______________________________________________|
  157. | Debug entries with bit 01 set are unused. |
  158. | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM |
  159. | 28 LCSYM | 2A MAIN | 2C | 2E BNSYM |
  160. | 30 PC | 32 NSYMS | 34 NOMAP | 36 |
  161. | 38 OBJ | 3A | 3C OPT | 3E |
  162. | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE |
  163. | 48 BSLINE*| 4A DEFD | 4C | 4E ENSYM |
  164. | 50 EHDECL*| 52 | 54 CATCH | 56 |
  165. | 58 | 5A | 5C | 5E |
  166. | 60 SSYM | 62 | 64 SO | 66 |
  167. | 68 | 6A | 6C | 6E |
  168. | 70 | 72 | 74 | 76 |
  169. | 78 | 7A | 7C | 7E |
  170. | 80 LSYM | 82 BINCL | 84 SOL | 86 |
  171. | 88 | 8A | 8C | 8E |
  172. | 90 | 92 | 94 | 96 |
  173. | 98 | 9A | 9C | 9E |
  174. | A0 PSYM | A2 EINCL | A4 ENTRY | A6 |
  175. | A8 | AA | AC | AE |
  176. | B0 | B2 | B4 | B6 |
  177. | B8 | BA | BC | BE |
  178. | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 |
  179. | C8 | CA | CC | CE |
  180. | D0 | D2 | D4 | D6 |
  181. | D8 | DA | DC | DE |
  182. | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 |
  183. | E8 ECOML | EA | EC | EE |
  184. | F0 | F2 | F4 | F6 |
  185. | F8 | FA | FC | FE LENG |
  186. +-----------------------------------------------+
  187. * 50 EHDECL is also MOD2.
  188. * 48 BSLINE is also BROWS.
  189. */