xref: /dflybsd-src/contrib/gdb-7/include/aout/stab.def (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino/* Table of DBX symbol codes for the GNU system.
286d7f5d3SJohn Marino   Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998, 2004, 2010
386d7f5d3SJohn Marino   Free Software Foundation, Inc.
486d7f5d3SJohn Marino
586d7f5d3SJohn Marino   This program is free software; you can redistribute it and/or
686d7f5d3SJohn Marino   modify it under the terms of the GNU General Public License as
786d7f5d3SJohn Marino   published by the Free Software Foundation; either version 3 of the
886d7f5d3SJohn Marino   License, or (at your option) any later version.
986d7f5d3SJohn Marino
1086d7f5d3SJohn Marino   This program is distributed in the hope that it will be useful,
1186d7f5d3SJohn Marino   but WITHOUT ANY WARRANTY; without even the implied warranty of
1286d7f5d3SJohn Marino   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1386d7f5d3SJohn Marino   GNU General Public License for more details.
1486d7f5d3SJohn Marino
1586d7f5d3SJohn Marino   You should have received a copy of the GNU General Public License
1686d7f5d3SJohn Marino   along with this program; if not, write to the Free Software
1786d7f5d3SJohn Marino   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
1886d7f5d3SJohn Marino   MA 02110-1301, USA.  */
1986d7f5d3SJohn Marino
2086d7f5d3SJohn Marino/* New stab from Solaris 2.  This uses an n_type of 0, which in a.out files
2186d7f5d3SJohn Marino   overlaps the N_UNDF used for ordinary symbols.  In ELF files, the
2286d7f5d3SJohn Marino   debug information is in a different file section, so there is no conflict.
2386d7f5d3SJohn Marino   This symbol's n_value gives the size of the string section associated
2486d7f5d3SJohn Marino   with this file.  The symbol's n_strx (relative to the just-updated
2586d7f5d3SJohn Marino   string section start address) gives the name of the source file,
2686d7f5d3SJohn Marino   e.g. "foo.c", without any path information.  The symbol's n_desc gives
2786d7f5d3SJohn Marino   the count of upcoming symbols associated with this file (not including
2886d7f5d3SJohn Marino   this one).  */
2986d7f5d3SJohn Marino/* __define_stab (N_UNDF, 0x00, "UNDF")  */
3086d7f5d3SJohn Marino
3186d7f5d3SJohn Marino/* Global variable.  Only the name is significant.
3286d7f5d3SJohn Marino   To find the address, look in the corresponding external symbol.  */
3386d7f5d3SJohn Marino__define_stab (N_GSYM, 0x20, "GSYM")
3486d7f5d3SJohn Marino
3586d7f5d3SJohn Marino/* Function name for BSD Fortran.  Only the name is significant.
3686d7f5d3SJohn Marino   To find the address, look in the corresponding external symbol.  */
3786d7f5d3SJohn Marino__define_stab (N_FNAME, 0x22, "FNAME")
3886d7f5d3SJohn Marino
3986d7f5d3SJohn Marino/* Function name or text-segment variable for C.  Value is its address.
4086d7f5d3SJohn Marino   Desc is supposedly starting line number, but GCC doesn't set it
4186d7f5d3SJohn Marino   and DBX seems not to miss it.  */
4286d7f5d3SJohn Marino__define_stab (N_FUN, 0x24, "FUN")
4386d7f5d3SJohn Marino
4486d7f5d3SJohn Marino/* Data-segment variable with internal linkage.  Value is its address.
4586d7f5d3SJohn Marino   "Static Sym".  */
4686d7f5d3SJohn Marino__define_stab (N_STSYM, 0x26, "STSYM")
4786d7f5d3SJohn Marino
4886d7f5d3SJohn Marino/* BSS-segment variable with internal linkage.  Value is its address.  */
4986d7f5d3SJohn Marino__define_stab (N_LCSYM, 0x28, "LCSYM")
5086d7f5d3SJohn Marino
5186d7f5d3SJohn Marino/* Name of main routine.  Only the name is significant.  */
5286d7f5d3SJohn Marino__define_stab (N_MAIN, 0x2a, "MAIN")
5386d7f5d3SJohn Marino
5486d7f5d3SJohn Marino/* Solaris2:  Read-only data symbols.  */
5586d7f5d3SJohn Marino__define_stab (N_ROSYM, 0x2c, "ROSYM")
5686d7f5d3SJohn Marino
5786d7f5d3SJohn Marino/* MacOS X:
5886d7f5d3SJohn Marino   The beginning of a relocatable function block - including stabs.  */
5986d7f5d3SJohn Marino__define_stab (N_BNSYM, 0x2e, "BNSYM")
6086d7f5d3SJohn Marino
6186d7f5d3SJohn Marino/* Global symbol in Pascal.
6286d7f5d3SJohn Marino   Supposedly the value is its line number; I'm skeptical.  */
6386d7f5d3SJohn Marino__define_stab (N_PC, 0x30, "PC")
6486d7f5d3SJohn Marino
6586d7f5d3SJohn Marino/* Number of symbols:  0, files,,funcs,lines according to Ultrix V4.0. */
6686d7f5d3SJohn Marino__define_stab (N_NSYMS, 0x32, "NSYMS")
6786d7f5d3SJohn Marino
6886d7f5d3SJohn Marino/* "No DST map for sym: name, ,0,type,ignored"  according to Ultrix V4.0. */
6986d7f5d3SJohn Marino__define_stab (N_NOMAP, 0x34, "NOMAP")
7086d7f5d3SJohn Marino
7186d7f5d3SJohn Marino/* New stab from Solaris 2.  Like N_SO, but for the object file.  Two in
7286d7f5d3SJohn Marino   a row provide the build directory and the relative path of the .o from it.
7386d7f5d3SJohn Marino   Solaris2 uses this to avoid putting the stabs info into the linked
7486d7f5d3SJohn Marino   executable; this stab goes into the ".stab.index" section, and the debugger
7586d7f5d3SJohn Marino   reads the real stabs directly from the .o files instead.  */
7686d7f5d3SJohn Marino__define_stab (N_OBJ, 0x38, "OBJ")
7786d7f5d3SJohn Marino
7886d7f5d3SJohn Marino/* New stab from Solaris 2.  Options for the debugger, related to the
7986d7f5d3SJohn Marino   source language for this module.  E.g. whether to use ANSI
8086d7f5d3SJohn Marino   integral promotions or traditional integral promotions.  */
8186d7f5d3SJohn Marino__define_stab (N_OPT, 0x3c, "OPT")
8286d7f5d3SJohn Marino
8386d7f5d3SJohn Marino/* Register variable.  Value is number of register.  */
8486d7f5d3SJohn Marino__define_stab (N_RSYM, 0x40, "RSYM")
8586d7f5d3SJohn Marino
8686d7f5d3SJohn Marino/* Modula-2 compilation unit.  Can someone say what info it contains?  */
8786d7f5d3SJohn Marino__define_stab (N_M2C, 0x42, "M2C")
8886d7f5d3SJohn Marino
8986d7f5d3SJohn Marino/* Line number in text segment.  Desc is the line number;
9086d7f5d3SJohn Marino   value is corresponding address.  On Solaris2, the line number is
9186d7f5d3SJohn Marino   relative to the start of the current function.  */
9286d7f5d3SJohn Marino__define_stab (N_SLINE, 0x44, "SLINE")
9386d7f5d3SJohn Marino
9486d7f5d3SJohn Marino/* Similar, for data segment.  */
9586d7f5d3SJohn Marino__define_stab (N_DSLINE, 0x46, "DSLINE")
9686d7f5d3SJohn Marino
9786d7f5d3SJohn Marino/* Similar, for bss segment.  */
9886d7f5d3SJohn Marino__define_stab (N_BSLINE, 0x48, "BSLINE")
9986d7f5d3SJohn Marino
10086d7f5d3SJohn Marino/* Sun's source-code browser stabs.  ?? Don't know what the fields are.
10186d7f5d3SJohn Marino   Supposedly the field is "path to associated .cb file".  THIS VALUE
10286d7f5d3SJohn Marino   OVERLAPS WITH N_BSLINE!  */
10386d7f5d3SJohn Marino__define_stab_duplicate (N_BROWS, 0x48, "BROWS")
10486d7f5d3SJohn Marino
10586d7f5d3SJohn Marino/* GNU Modula-2 definition module dependency.  Value is the modification time
10686d7f5d3SJohn Marino   of the definition file.  Other is non-zero if it is imported with the
10786d7f5d3SJohn Marino   GNU M2 keyword %INITIALIZE.  Perhaps N_M2C can be used if there
10886d7f5d3SJohn Marino   are enough empty fields? */
10986d7f5d3SJohn Marino__define_stab(N_DEFD, 0x4a, "DEFD")
11086d7f5d3SJohn Marino
11186d7f5d3SJohn Marino/* New in Solaris2.  Function start/body/end line numbers.  */
11286d7f5d3SJohn Marino__define_stab(N_FLINE, 0x4C, "FLINE")
11386d7f5d3SJohn Marino
11486d7f5d3SJohn Marino/* MacOS X: This tells the end of a relocatable function + debugging info.  */
11586d7f5d3SJohn Marino__define_stab(N_ENSYM, 0x4E, "ENSYM")
11686d7f5d3SJohn Marino
11786d7f5d3SJohn Marino/* THE FOLLOWING TWO STAB VALUES CONFLICT.  Happily, one is for Modula-2
11886d7f5d3SJohn Marino   and one is for C++.   Still,... */
11986d7f5d3SJohn Marino/* GNU C++ exception variable.  Name is variable name.  */
12086d7f5d3SJohn Marino__define_stab (N_EHDECL, 0x50, "EHDECL")
12186d7f5d3SJohn Marino/* Modula2 info "for imc":  name,,0,0,0  according to Ultrix V4.0.  */
12286d7f5d3SJohn Marino__define_stab_duplicate (N_MOD2, 0x50, "MOD2")
12386d7f5d3SJohn Marino
12486d7f5d3SJohn Marino/* GNU C++ `catch' clause.  Value is its address.  Desc is nonzero if
12586d7f5d3SJohn Marino   this entry is immediately followed by a CAUGHT stab saying what exception
12686d7f5d3SJohn Marino   was caught.  Multiple CAUGHT stabs means that multiple exceptions
12786d7f5d3SJohn Marino   can be caught here.  If Desc is 0, it means all exceptions are caught
12886d7f5d3SJohn Marino   here.  */
12986d7f5d3SJohn Marino__define_stab (N_CATCH, 0x54, "CATCH")
13086d7f5d3SJohn Marino
13186d7f5d3SJohn Marino/* Structure or union element.  Value is offset in the structure.  */
13286d7f5d3SJohn Marino__define_stab (N_SSYM, 0x60, "SSYM")
13386d7f5d3SJohn Marino
13486d7f5d3SJohn Marino/* Solaris2:  Last stab emitted for module.  */
13586d7f5d3SJohn Marino__define_stab (N_ENDM, 0x62, "ENDM")
13686d7f5d3SJohn Marino
13786d7f5d3SJohn Marino/* Name of main source file.
13886d7f5d3SJohn Marino   Value is starting text address of the compilation.
13986d7f5d3SJohn Marino   If multiple N_SO's appear, the first to contain a trailing / is the
14086d7f5d3SJohn Marino   compilation directory.  The first to not contain a trailing / is the
14186d7f5d3SJohn Marino   source file name, relative to the compilation directory.  Others (perhaps
14286d7f5d3SJohn Marino   resulting from cfront) are ignored.
14386d7f5d3SJohn Marino   On Solaris2, value is undefined, but desc is a source-language code.  */
14486d7f5d3SJohn Marino
14586d7f5d3SJohn Marino__define_stab (N_SO, 0x64, "SO")
14686d7f5d3SJohn Marino
14786d7f5d3SJohn Marino/* Apple:  This is the stab that associated the .o file with the
14886d7f5d3SJohn Marino   N_SO stab, in the case where debug info is mostly stored in the .o file.  */
14986d7f5d3SJohn Marino__define_stab (N_OSO, 0x66, "OSO")
15086d7f5d3SJohn Marino
15186d7f5d3SJohn Marino/* SunPro F77:  Name of alias.  */
15286d7f5d3SJohn Marino__define_stab (N_ALIAS, 0x6c, "ALIAS")
15386d7f5d3SJohn Marino
15486d7f5d3SJohn Marino/* Automatic variable in the stack.  Value is offset from frame pointer.
15586d7f5d3SJohn Marino   Also used for type descriptions.  */
15686d7f5d3SJohn Marino__define_stab (N_LSYM, 0x80, "LSYM")
15786d7f5d3SJohn Marino
15886d7f5d3SJohn Marino/* Beginning of an include file.  Only Sun uses this.
15986d7f5d3SJohn Marino   In an object file, only the name is significant.
16086d7f5d3SJohn Marino   The Sun linker puts data into some of the other fields.  */
16186d7f5d3SJohn Marino__define_stab (N_BINCL, 0x82, "BINCL")
16286d7f5d3SJohn Marino
16386d7f5d3SJohn Marino/* Name of sub-source file (#include file).
16486d7f5d3SJohn Marino   Value is starting text address of the compilation.  */
16586d7f5d3SJohn Marino__define_stab (N_SOL, 0x84, "SOL")
16686d7f5d3SJohn Marino
16786d7f5d3SJohn Marino/* Parameter variable.  Value is offset from argument pointer.
16886d7f5d3SJohn Marino   (On most machines the argument pointer is the same as the frame pointer.  */
16986d7f5d3SJohn Marino__define_stab (N_PSYM, 0xa0, "PSYM")
17086d7f5d3SJohn Marino
17186d7f5d3SJohn Marino/* End of an include file.  No name.
17286d7f5d3SJohn Marino   This and N_BINCL act as brackets around the file's output.
17386d7f5d3SJohn Marino   In an object file, there is no significant data in this entry.
17486d7f5d3SJohn Marino   The Sun linker puts data into some of the fields.  */
17586d7f5d3SJohn Marino__define_stab (N_EINCL, 0xa2, "EINCL")
17686d7f5d3SJohn Marino
17786d7f5d3SJohn Marino/* Alternate entry point.  Value is its address.  */
17886d7f5d3SJohn Marino__define_stab (N_ENTRY, 0xa4, "ENTRY")
17986d7f5d3SJohn Marino
18086d7f5d3SJohn Marino/* Beginning of lexical block.
18186d7f5d3SJohn Marino   The desc is the nesting level in lexical blocks.
18286d7f5d3SJohn Marino   The value is the address of the start of the text for the block.
18386d7f5d3SJohn Marino   The variables declared inside the block *precede* the N_LBRAC symbol.
18486d7f5d3SJohn Marino   On Solaris2, the value is relative to the start of the current function.  */
18586d7f5d3SJohn Marino__define_stab (N_LBRAC, 0xc0, "LBRAC")
18686d7f5d3SJohn Marino
18786d7f5d3SJohn Marino/* Place holder for deleted include file.  Replaces a N_BINCL and everything
18886d7f5d3SJohn Marino   up to the corresponding N_EINCL.  The Sun linker generates these when
18986d7f5d3SJohn Marino   it finds multiple identical copies of the symbols from an include file.
19086d7f5d3SJohn Marino   This appears only in output from the Sun linker.  */
19186d7f5d3SJohn Marino__define_stab (N_EXCL, 0xc2, "EXCL")
19286d7f5d3SJohn Marino
19386d7f5d3SJohn Marino/* Modula-2 scope information.  Can someone say what info it contains?  */
19486d7f5d3SJohn Marino__define_stab (N_SCOPE, 0xc4, "SCOPE")
19586d7f5d3SJohn Marino
19686d7f5d3SJohn Marino/* Solaris2: Patch Run Time Checker.  */
19786d7f5d3SJohn Marino__define_stab (N_PATCH, 0xd0, "PATCH")
19886d7f5d3SJohn Marino
19986d7f5d3SJohn Marino/* End of a lexical block.  Desc matches the N_LBRAC's desc.
20086d7f5d3SJohn Marino   The value is the address of the end of the text for the block.
20186d7f5d3SJohn Marino   On Solaris2, the value is relative to the start of the current function.  */
20286d7f5d3SJohn Marino__define_stab (N_RBRAC, 0xe0, "RBRAC")
20386d7f5d3SJohn Marino
20486d7f5d3SJohn Marino/* Begin named common block.  Only the name is significant.  */
20586d7f5d3SJohn Marino__define_stab (N_BCOMM, 0xe2, "BCOMM")
20686d7f5d3SJohn Marino
20786d7f5d3SJohn Marino/* End named common block.  Only the name is significant
20886d7f5d3SJohn Marino   (and it should match the N_BCOMM).  */
20986d7f5d3SJohn Marino__define_stab (N_ECOMM, 0xe4, "ECOMM")
21086d7f5d3SJohn Marino
21186d7f5d3SJohn Marino/* Member of a common block; value is offset within the common block.
21286d7f5d3SJohn Marino   This should occur within a BCOMM/ECOMM pair.  */
21386d7f5d3SJohn Marino__define_stab (N_ECOML, 0xe8, "ECOML")
21486d7f5d3SJohn Marino
21586d7f5d3SJohn Marino/* Solaris2: Pascal "with" statement: type,,0,0,offset */
21686d7f5d3SJohn Marino__define_stab (N_WITH, 0xea, "WITH")
21786d7f5d3SJohn Marino
21886d7f5d3SJohn Marino/* These STAB's are used on Gould systems for Non-Base register symbols
21986d7f5d3SJohn Marino   or something like that.  FIXME.  I have assigned the values at random
22086d7f5d3SJohn Marino   since I don't have a Gould here.  Fixups from Gould folk welcome... */
22186d7f5d3SJohn Marino__define_stab (N_NBTEXT, 0xF0, "NBTEXT")
22286d7f5d3SJohn Marino__define_stab (N_NBDATA, 0xF2, "NBDATA")
22386d7f5d3SJohn Marino__define_stab (N_NBBSS,  0xF4, "NBBSS")
22486d7f5d3SJohn Marino__define_stab (N_NBSTS,  0xF6, "NBSTS")
22586d7f5d3SJohn Marino__define_stab (N_NBLCS,  0xF8, "NBLCS")
22686d7f5d3SJohn Marino
22786d7f5d3SJohn Marino/* Second symbol entry containing a length-value for the preceding entry.
22886d7f5d3SJohn Marino   The value is the length.  */
22986d7f5d3SJohn Marino__define_stab (N_LENG, 0xfe, "LENG")
23086d7f5d3SJohn Marino
23186d7f5d3SJohn Marino/* The above information, in matrix format.
23286d7f5d3SJohn Marino
23386d7f5d3SJohn Marino			STAB MATRIX
23486d7f5d3SJohn Marino	_________________________________________________
23586d7f5d3SJohn Marino	| 00 - 1F are not dbx stab symbols		|
23686d7f5d3SJohn Marino	| In most cases, the low bit is the EXTernal bit|
23786d7f5d3SJohn Marino
23886d7f5d3SJohn Marino	| 00 UNDEF  | 02 ABS	| 04 TEXT   | 06 DATA	|
23986d7f5d3SJohn Marino	| 01  |EXT  | 03  |EXT	| 05  |EXT  | 07  |EXT	|
24086d7f5d3SJohn Marino
24186d7f5d3SJohn Marino	| 08 BSS    | 0A INDR	| 0C FN_SEQ | 0E WEAKA	|
24286d7f5d3SJohn Marino	| 09  |EXT  | 0B 	| 0D WEAKU  | 0F WEAKT	|
24386d7f5d3SJohn Marino
24486d7f5d3SJohn Marino	| 10 WEAKD  | 12 COMM	| 14 SETA   | 16 SETT	|
24586d7f5d3SJohn Marino	| 11 WEAKB  | 13	| 15 	    | 17	|
24686d7f5d3SJohn Marino
24786d7f5d3SJohn Marino	| 18 SETD   | 1A SETB	| 1C SETV   | 1E WARNING|
24886d7f5d3SJohn Marino	| 19	    | 1B	| 1D 	    | 1F FN	|
24986d7f5d3SJohn Marino
25086d7f5d3SJohn Marino	|_______________________________________________|
25186d7f5d3SJohn Marino	| Debug entries with bit 01 set are unused.	|
25286d7f5d3SJohn Marino	| 20 GSYM   | 22 FNAME	| 24 FUN    | 26 STSYM	|
25386d7f5d3SJohn Marino	| 28 LCSYM  | 2A MAIN	| 2C ROSYM  | 2E	|
25486d7f5d3SJohn Marino	| 30 PC	    | 32 NSYMS	| 34 NOMAP  | 36	|
25586d7f5d3SJohn Marino	| 38 OBJ    | 3A	| 3C OPT    | 3E	|
25686d7f5d3SJohn Marino	| 40 RSYM   | 42 M2C	| 44 SLINE  | 46 DSLINE |
25786d7f5d3SJohn Marino	| 48 BSLINE*| 4A DEFD	| 4C FLINE  | 4E	|
25886d7f5d3SJohn Marino	| 50 EHDECL*| 52	| 54 CATCH  | 56        |
25986d7f5d3SJohn Marino	| 58        | 5A        | 5C        | 5E	|
26086d7f5d3SJohn Marino	| 60 SSYM   | 62 ENDM	| 64 SO	    | 66 	|
26186d7f5d3SJohn Marino	| 68 	    | 6A	| 6C ALIAS  | 6E	|
26286d7f5d3SJohn Marino	| 70	    | 72	| 74	    | 76	|
26386d7f5d3SJohn Marino	| 78	    | 7A	| 7C	    | 7E	|
26486d7f5d3SJohn Marino	| 80 LSYM   | 82 BINCL	| 84 SOL    | 86	|
26586d7f5d3SJohn Marino	| 88	    | 8A	| 8C	    | 8E	|
26686d7f5d3SJohn Marino	| 90	    | 92	| 94	    | 96	|
26786d7f5d3SJohn Marino	| 98	    | 9A	| 9C	    | 9E	|
26886d7f5d3SJohn Marino	| A0 PSYM   | A2 EINCL	| A4 ENTRY  | A6	|
26986d7f5d3SJohn Marino	| A8	    | AA	| AC	    | AE	|
27086d7f5d3SJohn Marino	| B0	    | B2	| B4	    | B6	|
27186d7f5d3SJohn Marino	| B8	    | BA	| BC	    | BE	|
27286d7f5d3SJohn Marino	| C0 LBRAC  | C2 EXCL	| C4 SCOPE  | C6	|
27386d7f5d3SJohn Marino	| C8	    | CA	| CC	    | CE	|
27486d7f5d3SJohn Marino	| D0 PATCH  | D2	| D4	    | D6	|
27586d7f5d3SJohn Marino	| D8	    | DA	| DC	    | DE	|
27686d7f5d3SJohn Marino	| E0 RBRAC  | E2 BCOMM	| E4 ECOMM  | E6	|
27786d7f5d3SJohn Marino	| E8 ECOML  | EA WITH	| EC	    | EE	|
27886d7f5d3SJohn Marino	| F0	    | F2	| F4	    | F6	|
27986d7f5d3SJohn Marino	| F8	    | FA	| FC	    | FE LENG	|
28086d7f5d3SJohn Marino	+-----------------------------------------------+
28186d7f5d3SJohn Marino * 50 EHDECL is also MOD2.
28286d7f5d3SJohn Marino * 48 BSLINE is also BROWS.
28386d7f5d3SJohn Marino */
284