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