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