source: branches/libc-0.6/src/emx/include/a_out_stab.h@ 3951

Last change on this file since 3951 was 1506, checked in by bird, 21 years ago

@unixroot. header reviews. ++

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