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