stab.def revision 33965
1/* Table of DBX symbol codes for the GNU system. 2 Copyright (C) 1988, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. 3 4This program is free software; you can redistribute it and/or modify 5it under the terms of the GNU General Public License as published by 6the Free Software Foundation; either version 2 of the License, or 7(at your option) any later version. 8 9This program is distributed in the hope that it will be useful, 10but WITHOUT ANY WARRANTY; without even the implied warranty of 11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12GNU General Public License for more details. 13 14You should have received a copy of the GNU General Public License 15along with this program; if not, write to the Free Software 16Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 17 18/* New stab from Solaris 2. This uses an n_type of 0, which in a.out files 19 overlaps the N_UNDF used for ordinary symbols. In ELF files, the 20 debug information is in a different file section, so there is no conflict. 21 This symbol's n_value gives the size of the string section associated 22 with this file. The symbol's n_strx (relative to the just-updated 23 string section start address) gives the name of the source file, 24 e.g. "foo.c", without any path information. The symbol's n_desc gives 25 the count of upcoming symbols associated with this file (not including 26 this one). */ 27/* __define_stab (N_UNDF, 0x00, "UNDF") */ 28 29/* Global variable. Only the name is significant. 30 To find the address, look in the corresponding external symbol. */ 31__define_stab (N_GSYM, 0x20, "GSYM") 32 33/* Function name for BSD Fortran. Only the name is significant. 34 To find the address, look in the corresponding external symbol. */ 35__define_stab (N_FNAME, 0x22, "FNAME") 36 37/* Function name or text-segment variable for C. Value is its address. 38 Desc is supposedly starting line number, but GCC doesn't set it 39 and DBX seems not to miss it. */ 40__define_stab (N_FUN, 0x24, "FUN") 41 42/* Data-segment variable with internal linkage. Value is its address. 43 "Static Sym". */ 44__define_stab (N_STSYM, 0x26, "STSYM") 45 46/* BSS-segment variable with internal linkage. Value is its address. */ 47__define_stab (N_LCSYM, 0x28, "LCSYM") 48 49/* Name of main routine. Only the name is significant. */ 50__define_stab (N_MAIN, 0x2a, "MAIN") 51 52/* Solaris2: Read-only data symbols. */ 53__define_stab (N_ROSYM, 0x2c, "ROSYM") 54 55/* Global symbol in Pascal. 56 Supposedly the value is its line number; I'm skeptical. */ 57__define_stab (N_PC, 0x30, "PC") 58 59/* Number of symbols: 0, files,,funcs,lines according to Ultrix V4.0. */ 60__define_stab (N_NSYMS, 0x32, "NSYMS") 61 62/* "No DST map for sym: name, ,0,type,ignored" according to Ultrix V4.0. */ 63__define_stab (N_NOMAP, 0x34, "NOMAP") 64 65/* New stab from Solaris 2. Like N_SO, but for the object file. Two in 66 a row provide the build directory and the relative path of the .o from it. 67 Solaris2 uses this to avoid putting the stabs info into the linked 68 executable; this stab goes into the ".stab.index" section, and the debugger 69 reads the real stabs directly from the .o files instead. */ 70__define_stab (N_OBJ, 0x38, "OBJ") 71 72/* New stab from Solaris 2. Options for the debugger, related to the 73 source language for this module. E.g. whether to use ANSI 74 integral promotions or traditional integral promotions. */ 75__define_stab (N_OPT, 0x3c, "OPT") 76 77/* Register variable. Value is number of register. */ 78__define_stab (N_RSYM, 0x40, "RSYM") 79 80/* Modula-2 compilation unit. Can someone say what info it contains? */ 81__define_stab (N_M2C, 0x42, "M2C") 82 83/* Line number in text segment. Desc is the line number; 84 value is corresponding address. On Solaris2, the line number is 85 relative to the start of the current function. */ 86__define_stab (N_SLINE, 0x44, "SLINE") 87 88/* Similar, for data segment. */ 89__define_stab (N_DSLINE, 0x46, "DSLINE") 90 91/* Similar, for bss segment. */ 92__define_stab (N_BSLINE, 0x48, "BSLINE") 93 94/* Sun's source-code browser stabs. ?? Don't know what the fields are. 95 Supposedly the field is "path to associated .cb file". THIS VALUE 96 OVERLAPS WITH N_BSLINE! */ 97__define_stab_duplicate (N_BROWS, 0x48, "BROWS") 98 99/* GNU Modula-2 definition module dependency. Value is the modification time 100 of the definition file. Other is non-zero if it is imported with the 101 GNU M2 keyword %INITIALIZE. Perhaps N_M2C can be used if there 102 are enough empty fields? */ 103__define_stab(N_DEFD, 0x4a, "DEFD") 104 105/* New in Solaris2. Function start/body/end line numbers. */ 106__define_stab(N_FLINE, 0x4C, "FLINE") 107 108/* THE FOLLOWING TWO STAB VALUES CONFLICT. Happily, one is for Modula-2 109 and one is for C++. Still,... */ 110/* GNU C++ exception variable. Name is variable name. */ 111__define_stab (N_EHDECL, 0x50, "EHDECL") 112/* Modula2 info "for imc": name,,0,0,0 according to Ultrix V4.0. */ 113__define_stab_duplicate (N_MOD2, 0x50, "MOD2") 114 115/* GNU C++ `catch' clause. Value is its address. Desc is nonzero if 116 this entry is immediately followed by a CAUGHT stab saying what exception 117 was caught. Multiple CAUGHT stabs means that multiple exceptions 118 can be caught here. If Desc is 0, it means all exceptions are caught 119 here. */ 120__define_stab (N_CATCH, 0x54, "CATCH") 121 122/* Structure or union element. Value is offset in the structure. */ 123__define_stab (N_SSYM, 0x60, "SSYM") 124 125/* Solaris2: Last stab emitted for module. */ 126__define_stab (N_ENDM, 0x62, "ENDM") 127 128/* Name of main source file. 129 Value is starting text address of the compilation. 130 If multiple N_SO's appear, the first to contain a trailing / is the 131 compilation directory. The first to not contain a trailing / is the 132 source file name, relative to the compilation directory. Others (perhaps 133 resulting from cfront) are ignored. 134 On Solaris2, value is undefined, but desc is a source-language code. */ 135 136__define_stab (N_SO, 0x64, "SO") 137 138/* Automatic variable in the stack. Value is offset from frame pointer. 139 Also used for type descriptions. */ 140__define_stab (N_LSYM, 0x80, "LSYM") 141 142/* Beginning of an include file. Only Sun uses this. 143 In an object file, only the name is significant. 144 The Sun linker puts data into some of the other fields. */ 145__define_stab (N_BINCL, 0x82, "BINCL") 146 147/* Name of sub-source file (#include file). 148 Value is starting text address of the compilation. */ 149__define_stab (N_SOL, 0x84, "SOL") 150 151/* Parameter variable. Value is offset from argument pointer. 152 (On most machines the argument pointer is the same as the frame pointer. */ 153__define_stab (N_PSYM, 0xa0, "PSYM") 154 155/* End of an include file. No name. 156 This and N_BINCL act as brackets around the file's output. 157 In an object file, there is no significant data in this entry. 158 The Sun linker puts data into some of the fields. */ 159__define_stab (N_EINCL, 0xa2, "EINCL") 160 161/* Alternate entry point. Value is its address. */ 162__define_stab (N_ENTRY, 0xa4, "ENTRY") 163 164/* Beginning of lexical block. 165 The desc is the nesting level in lexical blocks. 166 The value is the address of the start of the text for the block. 167 The variables declared inside the block *precede* the N_LBRAC symbol. 168 On Solaris2, the value is relative to the start of the current function. */ 169__define_stab (N_LBRAC, 0xc0, "LBRAC") 170 171/* Place holder for deleted include file. Replaces a N_BINCL and everything 172 up to the corresponding N_EINCL. The Sun linker generates these when 173 it finds multiple identical copies of the symbols from an include file. 174 This appears only in output from the Sun linker. */ 175__define_stab (N_EXCL, 0xc2, "EXCL") 176 177/* Modula-2 scope information. Can someone say what info it contains? */ 178__define_stab (N_SCOPE, 0xc4, "SCOPE") 179 180/* End of a lexical block. Desc matches the N_LBRAC's desc. 181 The value is the address of the end of the text for the block. 182 On Solaris2, the value is relative to the start of the current function. */ 183__define_stab (N_RBRAC, 0xe0, "RBRAC") 184 185/* Begin named common block. Only the name is significant. */ 186__define_stab (N_BCOMM, 0xe2, "BCOMM") 187 188/* End named common block. Only the name is significant 189 (and it should match the N_BCOMM). */ 190__define_stab (N_ECOMM, 0xe4, "ECOMM") 191 192/* Member of a common block; value is offset within the common block. 193 This should occur within a BCOMM/ECOMM pair. */ 194__define_stab (N_ECOML, 0xe8, "ECOML") 195 196/* Solaris2: Pascal "with" statement: type,,0,0,offset */ 197__define_stab (N_WITH, 0xea, "WITH") 198 199/* These STAB's are used on Gould systems for Non-Base register symbols 200 or something like that. FIXME. I have assigned the values at random 201 since I don't have a Gould here. Fixups from Gould folk welcome... */ 202__define_stab (N_NBTEXT, 0xF0, "NBTEXT") 203__define_stab (N_NBDATA, 0xF2, "NBDATA") 204__define_stab (N_NBBSS, 0xF4, "NBBSS") 205__define_stab (N_NBSTS, 0xF6, "NBSTS") 206__define_stab (N_NBLCS, 0xF8, "NBLCS") 207 208/* Second symbol entry containing a length-value for the preceding entry. 209 The value is the length. */ 210__define_stab (N_LENG, 0xfe, "LENG") 211 212/* The above information, in matrix format. 213 214 STAB MATRIX 215 _________________________________________________ 216 | 00 - 1F are not dbx stab symbols | 217 | In most cases, the low bit is the EXTernal bit| 218 219 | 00 UNDEF | 02 ABS | 04 TEXT | 06 DATA | 220 | 01 |EXT | 03 |EXT | 05 |EXT | 07 |EXT | 221 222 | 08 BSS | 0A INDR | 0C FN_SEQ | 0E WEAKA | 223 | 09 |EXT | 0B | 0D WEAKU | 0F WEAKT | 224 225 | 10 WEAKD | 12 COMM | 14 SETA | 16 SETT | 226 | 11 WEAKB | 13 | 15 | 17 | 227 228 | 18 SETD | 1A SETB | 1C SETV | 1E WARNING| 229 | 19 | 1B | 1D | 1F FN | 230 231 |_______________________________________________| 232 | Debug entries with bit 01 set are unused. | 233 | 20 GSYM | 22 FNAME | 24 FUN | 26 STSYM | 234 | 28 LCSYM | 2A MAIN | 2C ROSYM | 2E | 235 | 30 PC | 32 NSYMS | 34 NOMAP | 36 | 236 | 38 OBJ | 3A | 3C OPT | 3E | 237 | 40 RSYM | 42 M2C | 44 SLINE | 46 DSLINE | 238 | 48 BSLINE*| 4A DEFD | 4C FLINE | 4E | 239 | 50 EHDECL*| 52 | 54 CATCH | 56 | 240 | 58 | 5A | 5C | 5E | 241 | 60 SSYM | 62 ENDM | 64 SO | 66 | 242 | 68 | 6A | 6C | 6E | 243 | 70 | 72 | 74 | 76 | 244 | 78 | 7A | 7C | 7E | 245 | 80 LSYM | 82 BINCL | 84 SOL | 86 | 246 | 88 | 8A | 8C | 8E | 247 | 90 | 92 | 94 | 96 | 248 | 98 | 9A | 9C | 9E | 249 | A0 PSYM | A2 EINCL | A4 ENTRY | A6 | 250 | A8 | AA | AC | AE | 251 | B0 | B2 | B4 | B6 | 252 | B8 | BA | BC | BE | 253 | C0 LBRAC | C2 EXCL | C4 SCOPE | C6 | 254 | C8 | CA | CC | CE | 255 | D0 | D2 | D4 | D6 | 256 | D8 | DA | DC | DE | 257 | E0 RBRAC | E2 BCOMM | E4 ECOMM | E6 | 258 | E8 ECOML | EA WITH | EC | EE | 259 | F0 | F2 | F4 | F6 | 260 | F8 | FA | FC | FE LENG | 261 +-----------------------------------------------+ 262 * 50 EHDECL is also MOD2. 263 * 48 BSLINE is also BROWS. 264 */ 265