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