hp-symtab.h revision 1.1 1 1.1 christos /* Definitions and structures for reading debug symbols from the
2 1.1 christos native HP C compiler.
3 1.1 christos
4 1.1 christos Written by the Center for Software Science at the University of Utah
5 1.1 christos and by Cygnus Support.
6 1.1 christos
7 1.1 christos Copyright 1994, 1995, 1998, 1999, 2003 Free Software Foundation, Inc.
8 1.1 christos
9 1.1 christos This program is free software; you can redistribute it and/or modify
10 1.1 christos it under the terms of the GNU General Public License as published by
11 1.1 christos the Free Software Foundation; either version 3 of the License, or
12 1.1 christos (at your option) any later version.
13 1.1 christos
14 1.1 christos This program is distributed in the hope that it will be useful,
15 1.1 christos but WITHOUT ANY WARRANTY; without even the implied warranty of
16 1.1 christos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 1.1 christos GNU General Public License for more details.
18 1.1 christos
19 1.1 christos You should have received a copy of the GNU General Public License
20 1.1 christos along with this program; if not, write to the Free Software
21 1.1 christos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
22 1.1 christos MA 02110-1301, USA. */
23 1.1 christos
24 1.1 christos #ifndef HP_SYMTAB_INCLUDED
25 1.1 christos #define HP_SYMTAB_INCLUDED
26 1.1 christos
27 1.1 christos /* General information:
28 1.1 christos
29 1.1 christos This header file defines and describes only the data structures
30 1.1 christos necessary to read debug symbols produced by the HP C compiler,
31 1.1 christos HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the
32 1.1 christos SOM object file format.
33 1.1 christos (For a full description of the debug format, ftp hpux-symtab.h from
34 1.1 christos jaguar.cs.utah.edu:/dist).
35 1.1 christos
36 1.1 christos Additional notes (Rich Title)
37 1.1 christos This file is a reverse-engineered version of a file called
38 1.1 christos "symtab.h" which exists internal to HP's Computer Languages Organization
39 1.1 christos in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of
40 1.1 christos the file is copyrighted and not distributed, it is necessary for
41 1.1 christos GDB to use the reverse-engineered version that follows.
42 1.1 christos Work was done by Cygnus to reverse-engineer the C subset of symtab.h.
43 1.1 christos The WDB project has extended this to also contain the C++
44 1.1 christos symbol definitions, the F90 symbol definitions,
45 1.1 christos and the DOC (debugging-optimized-code) symbol definitions.
46 1.1 christos In some cases (the C++ symbol definitions)
47 1.1 christos I have added internal documentation here that
48 1.1 christos goes beyond what is supplied in HP's symtab.h. If we someday
49 1.1 christos unify these files again, the extra comments should be merged back
50 1.1 christos into HP's symtab.h.
51 1.1 christos
52 1.1 christos -------------------------------------------------------------------
53 1.1 christos
54 1.1 christos Debug symbols are contained entirely within an unloadable space called
55 1.1 christos $DEBUG$. $DEBUG$ contains several subspaces which group related
56 1.1 christos debug symbols.
57 1.1 christos
58 1.1 christos $GNTT$ contains information for global variables, types and contants.
59 1.1 christos
60 1.1 christos $LNTT$ contains information for procedures (including nesting), scoping
61 1.1 christos information, local variables, types, and constants.
62 1.1 christos
63 1.1 christos $SLT$ contains source line information so that code addresses may be
64 1.1 christos mapped to source lines.
65 1.1 christos
66 1.1 christos $VT$ contains various strings and constants for named objects (variables,
67 1.1 christos typedefs, functions, etc). Strings are stored as null-terminated character
68 1.1 christos lists. Constants always begin on word boundaries. The first byte of
69 1.1 christos the VT must be zero (a null string).
70 1.1 christos
71 1.1 christos $XT$ is not currently used by GDB.
72 1.1 christos
73 1.1 christos Many structures within the subspaces point to other structures within
74 1.1 christos the same subspace, or to structures within a different subspace. These
75 1.1 christos pointers are represented as a structure index from the beginning of
76 1.1 christos the appropriate subspace. */
77 1.1 christos
78 1.1 christos /* Used to describe where a constant is stored. */
79 1.1 christos enum location_type
80 1.1 christos {
81 1.1 christos LOCATION_IMMEDIATE,
82 1.1 christos LOCATION_PTR,
83 1.1 christos LOCATION_VT,
84 1.1 christos };
85 1.1 christos
86 1.1 christos /* Languages supported by this debug format. Within the data structures
87 1.1 christos this type is limited to 4 bits for a maximum of 16 languages. */
88 1.1 christos enum hp_language
89 1.1 christos {
90 1.1 christos HP_LANGUAGE_UNKNOWN,
91 1.1 christos HP_LANGUAGE_C,
92 1.1 christos HP_LANGUAGE_FORTRAN,
93 1.1 christos HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN,
94 1.1 christos HP_LANGUAGE_PASCAL,
95 1.1 christos HP_LANGUAGE_MODCAL,
96 1.1 christos HP_LANGUAGE_COBOL,
97 1.1 christos HP_LANGUAGE_BASIC,
98 1.1 christos HP_LANGUAGE_ADA,
99 1.1 christos HP_LANGUAGE_CPLUSPLUS,
100 1.1 christos HP_LANGUAGE_DMPASCAL
101 1.1 christos };
102 1.1 christos
103 1.1 christos
104 1.1 christos /* Basic data types available in this debug format. Within the data
105 1.1 christos structures this type is limited to 5 bits for a maximum of 32 basic
106 1.1 christos data types. */
107 1.1 christos enum hp_type
108 1.1 christos {
109 1.1 christos HP_TYPE_UNDEFINED, /* 0 */
110 1.1 christos HP_TYPE_BOOLEAN, /* 1 */
111 1.1 christos HP_TYPE_CHAR, /* 2 */
112 1.1 christos HP_TYPE_INT, /* 3 */
113 1.1 christos HP_TYPE_UNSIGNED_INT, /* 4 */
114 1.1 christos HP_TYPE_REAL, /* 5 */
115 1.1 christos HP_TYPE_COMPLEX, /* 6 */
116 1.1 christos HP_TYPE_STRING200, /* 7 */
117 1.1 christos HP_TYPE_LONGSTRING200, /* 8 */
118 1.1 christos HP_TYPE_TEXT, /* 9 */
119 1.1 christos HP_TYPE_FLABEL, /* 10 */
120 1.1 christos HP_TYPE_FTN_STRING_SPEC, /* 11 */
121 1.1 christos HP_TYPE_MOD_STRING_SPEC, /* 12 */
122 1.1 christos HP_TYPE_PACKED_DECIMAL, /* 13 */
123 1.1 christos HP_TYPE_REAL_3000, /* 14 */
124 1.1 christos HP_TYPE_MOD_STRING_3000, /* 15 */
125 1.1 christos HP_TYPE_ANYPOINTER, /* 16 */
126 1.1 christos HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */
127 1.1 christos HP_TYPE_LOCAL_ANYPOINTER, /* 18 */
128 1.1 christos HP_TYPE_COMPLEXS3000, /* 19 */
129 1.1 christos HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */
130 1.1 christos HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */
131 1.1 christos HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */
132 1.1 christos HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */
133 1.1 christos HP_TYPE_WIDE_CHAR, /* 24 */
134 1.1 christos HP_TYPE_LONG, /* 25 */
135 1.1 christos HP_TYPE_UNSIGNED_LONG, /* 26 */
136 1.1 christos HP_TYPE_DOUBLE, /* 27 */
137 1.1 christos HP_TYPE_TEMPLATE_ARG, /* 28 */
138 1.1 christos HP_TYPE_VOID /* 29 */
139 1.1 christos };
140 1.1 christos
141 1.1 christos /* An immediate name and type table entry.
142 1.1 christos
143 1.1 christos extension and immediate will always be one.
144 1.1 christos global will always be zero.
145 1.1 christos hp_type is the basic type this entry describes.
146 1.1 christos bitlength is the length in bits for the basic type. */
147 1.1 christos struct dnttp_immediate
148 1.1 christos {
149 1.1 christos unsigned int extension: 1;
150 1.1 christos unsigned int immediate: 1;
151 1.1 christos unsigned int global: 1;
152 1.1 christos unsigned int type: 5;
153 1.1 christos unsigned int bitlength: 24;
154 1.1 christos };
155 1.1 christos
156 1.1 christos /* A nonimmediate name and type table entry.
157 1.1 christos
158 1.1 christos extension will always be one.
159 1.1 christos immediate will always be zero.
160 1.1 christos if global is zero, this entry points into the LNTT
161 1.1 christos if global is one, this entry points into the GNTT
162 1.1 christos index is the index within the GNTT or LNTT for this entry. */
163 1.1 christos struct dnttp_nonimmediate
164 1.1 christos {
165 1.1 christos unsigned int extension: 1;
166 1.1 christos unsigned int immediate: 1;
167 1.1 christos unsigned int global: 1;
168 1.1 christos unsigned int index: 29;
169 1.1 christos };
170 1.1 christos
171 1.1 christos /* A pointer to an entry in the GNTT and LNTT tables. It has two
172 1.1 christos forms depending on the type being described.
173 1.1 christos
174 1.1 christos The immediate form is used for simple entries and is one
175 1.1 christos word.
176 1.1 christos
177 1.1 christos The nonimmediate form is used for complex entries and contains
178 1.1 christos an index into the LNTT or GNTT which describes the entire type.
179 1.1 christos
180 1.1 christos If a dnttpointer is -1, then it is a NIL entry. */
181 1.1 christos
182 1.1 christos #define DNTTNIL (-1)
183 1.1 christos typedef union dnttpointer
184 1.1 christos {
185 1.1 christos struct dnttp_immediate dntti;
186 1.1 christos struct dnttp_nonimmediate dnttp;
187 1.1 christos int word;
188 1.1 christos } dnttpointer;
189 1.1 christos
190 1.1 christos /* An index into the source line table. As with dnttpointers, a sltpointer
191 1.1 christos of -1 indicates a NIL entry. */
192 1.1 christos #define SLTNIL (-1)
193 1.1 christos typedef int sltpointer;
194 1.1 christos
195 1.1 christos /* Index into DOC (= "Debugging Optimized Code") line table. */
196 1.1 christos #define LTNIL (-1)
197 1.1 christos typedef int ltpointer;
198 1.1 christos
199 1.1 christos /* Index into context table. */
200 1.1 christos #define CTXTNIL (-1)
201 1.1 christos typedef int ctxtpointer;
202 1.1 christos
203 1.1 christos /* Unsigned byte offset into the VT. */
204 1.1 christos typedef unsigned int vtpointer;
205 1.1 christos
206 1.1 christos /* A DNTT entry (used within the GNTT and LNTT).
207 1.1 christos
208 1.1 christos DNTT entries are variable sized objects, but are always a multiple
209 1.1 christos of 3 words (we call each group of 3 words a "block").
210 1.1 christos
211 1.1 christos The first bit in each block is an extension bit. This bit is zero
212 1.1 christos for the first block of a DNTT entry. If the entry requires more
213 1.1 christos than one block, then this bit is set to one in all blocks after
214 1.1 christos the first one. */
215 1.1 christos
216 1.1 christos /* Each DNTT entry describes a particular debug symbol (beginning of
217 1.1 christos a source file, a function, variables, structures, etc.
218 1.1 christos
219 1.1 christos The type of the DNTT entry is stored in the "kind" field within the
220 1.1 christos DNTT entry itself. */
221 1.1 christos
222 1.1 christos enum dntt_entry_type
223 1.1 christos {
224 1.1 christos DNTT_TYPE_NIL = -1,
225 1.1 christos DNTT_TYPE_SRCFILE,
226 1.1 christos DNTT_TYPE_MODULE,
227 1.1 christos DNTT_TYPE_FUNCTION,
228 1.1 christos DNTT_TYPE_ENTRY,
229 1.1 christos DNTT_TYPE_BEGIN,
230 1.1 christos DNTT_TYPE_END,
231 1.1 christos DNTT_TYPE_IMPORT,
232 1.1 christos DNTT_TYPE_LABEL,
233 1.1 christos DNTT_TYPE_FPARAM,
234 1.1 christos DNTT_TYPE_SVAR,
235 1.1 christos DNTT_TYPE_DVAR,
236 1.1 christos DNTT_TYPE_HOLE1,
237 1.1 christos DNTT_TYPE_CONST,
238 1.1 christos DNTT_TYPE_TYPEDEF,
239 1.1 christos DNTT_TYPE_TAGDEF,
240 1.1 christos DNTT_TYPE_POINTER,
241 1.1 christos DNTT_TYPE_ENUM,
242 1.1 christos DNTT_TYPE_MEMENUM,
243 1.1 christos DNTT_TYPE_SET,
244 1.1 christos DNTT_TYPE_SUBRANGE,
245 1.1 christos DNTT_TYPE_ARRAY,
246 1.1 christos DNTT_TYPE_STRUCT,
247 1.1 christos DNTT_TYPE_UNION,
248 1.1 christos DNTT_TYPE_FIELD,
249 1.1 christos DNTT_TYPE_VARIANT,
250 1.1 christos DNTT_TYPE_FILE,
251 1.1 christos DNTT_TYPE_FUNCTYPE,
252 1.1 christos DNTT_TYPE_WITH,
253 1.1 christos DNTT_TYPE_COMMON,
254 1.1 christos DNTT_TYPE_COBSTRUCT,
255 1.1 christos DNTT_TYPE_XREF,
256 1.1 christos DNTT_TYPE_SA,
257 1.1 christos DNTT_TYPE_MACRO,
258 1.1 christos DNTT_TYPE_BLOCKDATA,
259 1.1 christos DNTT_TYPE_CLASS_SCOPE,
260 1.1 christos DNTT_TYPE_REFERENCE,
261 1.1 christos DNTT_TYPE_PTRMEM,
262 1.1 christos DNTT_TYPE_PTRMEMFUNC,
263 1.1 christos DNTT_TYPE_CLASS,
264 1.1 christos DNTT_TYPE_GENFIELD,
265 1.1 christos DNTT_TYPE_VFUNC,
266 1.1 christos DNTT_TYPE_MEMACCESS,
267 1.1 christos DNTT_TYPE_INHERITANCE,
268 1.1 christos DNTT_TYPE_FRIEND_CLASS,
269 1.1 christos DNTT_TYPE_FRIEND_FUNC,
270 1.1 christos DNTT_TYPE_MODIFIER,
271 1.1 christos DNTT_TYPE_OBJECT_ID,
272 1.1 christos DNTT_TYPE_MEMFUNC,
273 1.1 christos DNTT_TYPE_TEMPLATE,
274 1.1 christos DNTT_TYPE_TEMPLATE_ARG,
275 1.1 christos DNTT_TYPE_FUNC_TEMPLATE,
276 1.1 christos DNTT_TYPE_LINK,
277 1.1 christos DNTT_TYPE_DYN_ARRAY_DESC,
278 1.1 christos DNTT_TYPE_DESC_SUBRANGE,
279 1.1 christos DNTT_TYPE_BEGIN_EXT,
280 1.1 christos DNTT_TYPE_INLN,
281 1.1 christos DNTT_TYPE_INLN_LIST,
282 1.1 christos DNTT_TYPE_ALIAS,
283 1.1 christos DNTT_TYPE_DOC_FUNCTION,
284 1.1 christos DNTT_TYPE_DOC_MEMFUNC,
285 1.1 christos DNTT_TYPE_MAX
286 1.1 christos };
287 1.1 christos
288 1.1 christos /* DNTT_TYPE_SRCFILE:
289 1.1 christos
290 1.1 christos One DNTT_TYPE_SRCFILE symbol is output for the start of each source
291 1.1 christos file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE
292 1.1 christos entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers
293 1.1 christos can determine what file a function was defined in.
294 1.1 christos
295 1.1 christos LANGUAGE describes the source file's language.
296 1.1 christos
297 1.1 christos NAME points to an VT entry providing the source file's name.
298 1.1 christos
299 1.1 christos Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen
300 1.1 christos by the compiler (ie they may be relative or absolute). C include files
301 1.1 christos via <> inclusion must use absolute paths.
302 1.1 christos
303 1.1 christos ADDRESS points to an SLT entry from which line number and code locations
304 1.1 christos may be determined. */
305 1.1 christos
306 1.1 christos struct dntt_type_srcfile
307 1.1 christos {
308 1.1 christos unsigned int extension: 1;
309 1.1 christos unsigned int kind: 10; /* DNTT_TYPE_SRCFILE */
310 1.1 christos unsigned int language: 4;
311 1.1 christos unsigned int unused: 17;
312 1.1 christos vtpointer name;
313 1.1 christos sltpointer address;
314 1.1 christos };
315 1.1 christos
316 1.1 christos /* DNTT_TYPE_MODULE:
317 1.1 christos
318 1.1 christos A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal
319 1.1 christos module or C source file. A module indicates a compilation unit
320 1.1 christos for name-scoping purposes; in that regard there should be
321 1.1 christos a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records.
322 1.1 christos
323 1.1 christos Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol.
324 1.1 christos
325 1.1 christos NAME points to a VT entry providing the module's name. Note C
326 1.1 christos source files are considered nameless modules.
327 1.1 christos
328 1.1 christos ALIAS point to a VT entry providing a secondary name.
329 1.1 christos
330 1.1 christos ADDRESS points to an SLT entry from which line number and code locations
331 1.1 christos may be determined. */
332 1.1 christos
333 1.1 christos struct dntt_type_module
334 1.1 christos {
335 1.1 christos unsigned int extension: 1;
336 1.1 christos unsigned int kind: 10; /* DNTT_TYPE_MODULE */
337 1.1 christos unsigned int unused: 21;
338 1.1 christos vtpointer name;
339 1.1 christos vtpointer alias;
340 1.1 christos dnttpointer unused2;
341 1.1 christos sltpointer address;
342 1.1 christos };
343 1.1 christos
344 1.1 christos /* DNTT_TYPE_FUNCTION,
345 1.1 christos DNTT_TYPE_ENTRY,
346 1.1 christos DNTT_TYPE_BLOCKDATA,
347 1.1 christos DNTT_TYPE_MEMFUNC:
348 1.1 christos
349 1.1 christos A DNTT_TYPE_FUNCTION symbol is emitted for each function definition;
350 1.1 christos a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both
351 1.1 christos symbols used the dntt_type_function structure.
352 1.1 christos A DNTT_TYPE_BLOCKDATA symbol is emitted ...?
353 1.1 christos A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++).
354 1.1 christos
355 1.1 christos Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END.
356 1.1 christos
357 1.1 christos GLOBAL is nonzero if the function has global scope.
358 1.1 christos
359 1.1 christos LANGUAGE describes the function's source language.
360 1.1 christos
361 1.1 christos OPT_LEVEL describes the optimization level the function was compiled
362 1.1 christos with.
363 1.1 christos
364 1.1 christos VARARGS is nonzero if the function uses varargs.
365 1.1 christos
366 1.1 christos NAME points to a VT entry providing the function's name.
367 1.1 christos
368 1.1 christos ALIAS points to a VT entry providing a secondary name for the function.
369 1.1 christos
370 1.1 christos FIRSTPARAM points to a LNTT entry which describes the parameter list.
371 1.1 christos
372 1.1 christos ADDRESS points to an SLT entry from which line number and code locations
373 1.1 christos may be determined.
374 1.1 christos
375 1.1 christos ENTRYADDR is the memory address corresponding the function's entry point
376 1.1 christos
377 1.1 christos RETVAL points to a LNTT entry describing the function's return value.
378 1.1 christos
379 1.1 christos LOWADDR is the lowest memory address associated with this function.
380 1.1 christos
381 1.1 christos HIADDR is the highest memory address associated with this function. */
382 1.1 christos
383 1.1 christos struct dntt_type_function
384 1.1 christos {
385 1.1 christos unsigned int extension: 1;
386 1.1 christos unsigned int kind: 10; /* DNTT_TYPE_FUNCTION,
387 1.1 christos DNTT_TYPE_ENTRY,
388 1.1 christos DNTT_TYPE_BLOCKDATA
389 1.1 christos or DNTT_TYPE_MEMFUNC */
390 1.1 christos unsigned int global: 1;
391 1.1 christos unsigned int language: 4;
392 1.1 christos unsigned int nest_level: 5;
393 1.1 christos unsigned int opt_level: 2;
394 1.1 christos unsigned int varargs: 1;
395 1.1 christos unsigned int lang_info: 4;
396 1.1 christos unsigned int inlined: 1;
397 1.1 christos unsigned int localalloc: 1;
398 1.1 christos unsigned int expansion: 1;
399 1.1 christos unsigned int unused: 1;
400 1.1 christos vtpointer name;
401 1.1 christos vtpointer alias;
402 1.1 christos dnttpointer firstparam;
403 1.1 christos sltpointer address;
404 1.1 christos CORE_ADDR entryaddr;
405 1.1 christos dnttpointer retval;
406 1.1 christos CORE_ADDR lowaddr;
407 1.1 christos CORE_ADDR hiaddr;
408 1.1 christos };
409 1.1 christos
410 1.1 christos /* DNTT_TYPE_BEGIN:
411 1.1 christos
412 1.1 christos A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope.
413 1.1 christos Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol.
414 1.1 christos
415 1.1 christos CLASSFLAG is nonzero if this is the beginning of a c++ class definition.
416 1.1 christos
417 1.1 christos ADDRESS points to an SLT entry from which line number and code locations
418 1.1 christos may be determined. */
419 1.1 christos
420 1.1 christos struct dntt_type_begin
421 1.1 christos {
422 1.1 christos unsigned int extension: 1;
423 1.1 christos unsigned int kind: 10;
424 1.1 christos unsigned int classflag: 1;
425 1.1 christos unsigned int unused: 20;
426 1.1 christos sltpointer address;
427 1.1 christos };
428 1.1 christos
429 1.1 christos /* DNTT_TYPE_END:
430 1.1 christos
431 1.1 christos A DNTT_TYPE_END symbol is emitted when closing a scope started by
432 1.1 christos a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, DNTT_TYPE_WITH,
433 1.1 christos DNTT_TYPE_COMMON, DNTT_TYPE_BEGIN, and DNTT_TYPE_CLASS_SCOPE symbols.
434 1.1 christos
435 1.1 christos ENDKIND describes what type of scope the DNTT_TYPE_END is closing
436 1.1 christos (one of the above 6 kinds).
437 1.1 christos
438 1.1 christos CLASSFLAG is nonzero if this is the end of a c++ class definition.
439 1.1 christos
440 1.1 christos ADDRESS points to an SLT entry from which line number and code locations
441 1.1 christos may be determined.
442 1.1 christos
443 1.1 christos BEGINSCOPE points to the LNTT entry which opened the scope. */
444 1.1 christos
445 1.1 christos struct dntt_type_end
446 1.1 christos {
447 1.1 christos unsigned int extension: 1;
448 1.1 christos unsigned int kind: 10;
449 1.1 christos unsigned int endkind: 10;
450 1.1 christos unsigned int classflag: 1;
451 1.1 christos unsigned int unused: 10;
452 1.1 christos sltpointer address;
453 1.1 christos dnttpointer beginscope;
454 1.1 christos };
455 1.1 christos
456 1.1 christos /* DNTT_TYPE_IMPORT is unused by GDB. */
457 1.1 christos /* DNTT_TYPE_LABEL is unused by GDB. */
458 1.1 christos
459 1.1 christos /* DNTT_TYPE_FPARAM:
460 1.1 christos
461 1.1 christos A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When
462 1.1 christos chained together the symbols represent an argument list for a function.
463 1.1 christos
464 1.1 christos REGPARAM is nonzero if this parameter was passed in a register.
465 1.1 christos
466 1.1 christos INDIRECT is nonzero if this parameter is a pointer to the parameter
467 1.1 christos (pass by reference or pass by value for large items).
468 1.1 christos
469 1.1 christos LONGADDR is nonzero if the parameter is a 64bit pointer.
470 1.1 christos
471 1.1 christos NAME is a pointer into the VT for the parameter's name.
472 1.1 christos
473 1.1 christos LOCATION describes where the parameter is stored. Depending on the
474 1.1 christos parameter type LOCATION could be a register number, or an offset
475 1.1 christos from the stack pointer.
476 1.1 christos
477 1.1 christos TYPE points to a NTT entry describing the type of this parameter.
478 1.1 christos
479 1.1 christos NEXTPARAM points to the LNTT entry describing the next parameter. */
480 1.1 christos
481 1.1 christos struct dntt_type_fparam
482 1.1 christos {
483 1.1 christos unsigned int extension: 1;
484 1.1 christos unsigned int kind: 10;
485 1.1 christos unsigned int regparam: 1;
486 1.1 christos unsigned int indirect: 1;
487 1.1 christos unsigned int longaddr: 1;
488 1.1 christos unsigned int copyparam: 1;
489 1.1 christos unsigned int dflt: 1;
490 1.1 christos unsigned int doc_ranges: 1;
491 1.1 christos unsigned int misc_kind: 1;
492 1.1 christos unsigned int unused: 14;
493 1.1 christos vtpointer name;
494 1.1 christos CORE_ADDR location;
495 1.1 christos dnttpointer type;
496 1.1 christos dnttpointer nextparam;
497 1.1 christos int misc;
498 1.1 christos };
499 1.1 christos
500 1.1 christos /* DNTT_TYPE_SVAR:
501 1.1 christos
502 1.1 christos A DNTT_TYPE_SVAR is emitted to describe a variable in static storage.
503 1.1 christos
504 1.1 christos GLOBAL is nonzero if the variable has global scope.
505 1.1 christos
506 1.1 christos INDIRECT is nonzero if the variable is a pointer to an object.
507 1.1 christos
508 1.1 christos LONGADDR is nonzero if the variable is in long pointer space.
509 1.1 christos
510 1.1 christos STATICMEM is nonzero if the variable is a member of a class.
511 1.1 christos
512 1.1 christos A_UNION is nonzero if the variable is an anonymous union member.
513 1.1 christos
514 1.1 christos NAME is a pointer into the VT for the variable's name.
515 1.1 christos
516 1.1 christos LOCATION provides the memory address for the variable.
517 1.1 christos
518 1.1 christos TYPE is a pointer into either the GNTT or LNTT which describes
519 1.1 christos the type of this variable. */
520 1.1 christos
521 1.1 christos struct dntt_type_svar
522 1.1 christos {
523 1.1 christos unsigned int extension: 1;
524 1.1 christos unsigned int kind: 10;
525 1.1 christos unsigned int global: 1;
526 1.1 christos unsigned int indirect: 1;
527 1.1 christos unsigned int longaddr: 1;
528 1.1 christos unsigned int staticmem: 1;
529 1.1 christos unsigned int a_union: 1;
530 1.1 christos unsigned int unused1: 1;
531 1.1 christos unsigned int thread_specific: 1;
532 1.1 christos unsigned int unused2: 14;
533 1.1 christos vtpointer name;
534 1.1 christos CORE_ADDR location;
535 1.1 christos dnttpointer type;
536 1.1 christos unsigned int offset;
537 1.1 christos unsigned int displacement;
538 1.1 christos };
539 1.1 christos
540 1.1 christos /* DNTT_TYPE_DVAR:
541 1.1 christos
542 1.1 christos A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables
543 1.1 christos held in registers.
544 1.1 christos
545 1.1 christos GLOBAL is nonzero if the variable has global scope.
546 1.1 christos
547 1.1 christos INDIRECT is nonzero if the variable is a pointer to an object.
548 1.1 christos
549 1.1 christos REGVAR is nonzero if the variable is in a register.
550 1.1 christos
551 1.1 christos A_UNION is nonzero if the variable is an anonymous union member.
552 1.1 christos
553 1.1 christos NAME is a pointer into the VT for the variable's name.
554 1.1 christos
555 1.1 christos LOCATION provides the memory address or register number for the variable.
556 1.1 christos
557 1.1 christos TYPE is a pointer into either the GNTT or LNTT which describes
558 1.1 christos the type of this variable. */
559 1.1 christos
560 1.1 christos struct dntt_type_dvar
561 1.1 christos {
562 1.1 christos unsigned int extension: 1;
563 1.1 christos unsigned int kind: 10;
564 1.1 christos unsigned int global: 1;
565 1.1 christos unsigned int indirect: 1;
566 1.1 christos unsigned int regvar: 1;
567 1.1 christos unsigned int a_union: 1;
568 1.1 christos unsigned int unused: 17;
569 1.1 christos vtpointer name;
570 1.1 christos int location;
571 1.1 christos dnttpointer type;
572 1.1 christos unsigned int offset;
573 1.1 christos };
574 1.1 christos
575 1.1 christos /* DNTT_TYPE_CONST:
576 1.1 christos
577 1.1 christos A DNTT_TYPE_CONST symbol is emitted for program constants.
578 1.1 christos
579 1.1 christos GLOBAL is nonzero if the constant has global scope.
580 1.1 christos
581 1.1 christos INDIRECT is nonzero if the constant is a pointer to an object.
582 1.1 christos
583 1.1 christos LOCATION_TYPE describes where to find the constant's value
584 1.1 christos (in the VT, memory, or embedded in an instruction).
585 1.1 christos
586 1.1 christos CLASSMEM is nonzero if the constant is a member of a class.
587 1.1 christos
588 1.1 christos NAME is a pointer into the VT for the constant's name.
589 1.1 christos
590 1.1 christos LOCATION provides the memory address, register number or pointer
591 1.1 christos into the VT for the constant's value.
592 1.1 christos
593 1.1 christos TYPE is a pointer into either the GNTT or LNTT which describes
594 1.1 christos the type of this variable. */
595 1.1 christos
596 1.1 christos struct dntt_type_const
597 1.1 christos {
598 1.1 christos unsigned int extension: 1;
599 1.1 christos unsigned int kind: 10;
600 1.1 christos unsigned int global: 1;
601 1.1 christos unsigned int indirect: 1;
602 1.1 christos unsigned int location_type: 3;
603 1.1 christos unsigned int classmem: 1;
604 1.1 christos unsigned int unused: 15;
605 1.1 christos vtpointer name;
606 1.1 christos CORE_ADDR location;
607 1.1 christos dnttpointer type;
608 1.1 christos unsigned int offset;
609 1.1 christos unsigned int displacement;
610 1.1 christos };
611 1.1 christos
612 1.1 christos /* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF:
613 1.1 christos
614 1.1 christos The same structure is used to describe typedefs and tagdefs.
615 1.1 christos
616 1.1 christos DNTT_TYPE_TYPEDEFS are associated with C "typedefs".
617 1.1 christos
618 1.1 christos DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum"
619 1.1 christos tags, which may have the same name as a typedef in the same scope.
620 1.1 christos Also they are associated with C++ "class" tags, which implicitly have
621 1.1 christos the same name as the class type.
622 1.1 christos
623 1.1 christos GLOBAL is nonzero if the typedef/tagdef has global scope.
624 1.1 christos
625 1.1 christos TYPEINFO is used to determine if full type information is available
626 1.1 christos for a tag. (usually 1, but can be zero for opaque types in C).
627 1.1 christos
628 1.1 christos NAME is a pointer into the VT for the constant's name.
629 1.1 christos
630 1.1 christos TYPE points to the underlying type for the typedef/tagdef in the
631 1.1 christos GNTT or LNTT. */
632 1.1 christos
633 1.1 christos struct dntt_type_type
634 1.1 christos {
635 1.1 christos unsigned int extension: 1;
636 1.1 christos unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or
637 1.1 christos DNTT_TYPE_TAGDEF. */
638 1.1 christos unsigned int global: 1;
639 1.1 christos unsigned int typeinfo: 1;
640 1.1 christos unsigned int unused: 19;
641 1.1 christos vtpointer name;
642 1.1 christos dnttpointer type; /* Underlying type, which for TAGDEF's may be
643 1.1 christos DNTT_TYPE_STRUCT, DNTT_TYPE_UNION,
644 1.1 christos DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS.
645 1.1 christos For TYPEDEF's other underlying types
646 1.1 christos are also possible. */
647 1.1 christos };
648 1.1 christos
649 1.1 christos /* DNTT_TYPE_POINTER:
650 1.1 christos
651 1.1 christos Used to describe a pointer to an underlying type.
652 1.1 christos
653 1.1 christos POINTSTO is a pointer into the GNTT or LNTT for the type which this
654 1.1 christos pointer points to.
655 1.1 christos
656 1.1 christos BITLENGTH is the length of the pointer (not the underlying type). */
657 1.1 christos
658 1.1 christos struct dntt_type_pointer
659 1.1 christos {
660 1.1 christos unsigned int extension: 1;
661 1.1 christos unsigned int kind: 10;
662 1.1 christos unsigned int unused: 21;
663 1.1 christos dnttpointer pointsto;
664 1.1 christos unsigned int bitlength;
665 1.1 christos };
666 1.1 christos
667 1.1 christos
668 1.1 christos /* DNTT_TYPE_ENUM:
669 1.1 christos
670 1.1 christos Used to describe enumerated types.
671 1.1 christos
672 1.1 christos FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which
673 1.1 christos describes the first member (and contains a pointer to the chain of
674 1.1 christos members).
675 1.1 christos
676 1.1 christos BITLENGTH is the number of bits used to hold the values of the enum's
677 1.1 christos members. */
678 1.1 christos
679 1.1 christos struct dntt_type_enum
680 1.1 christos {
681 1.1 christos unsigned int extension: 1;
682 1.1 christos unsigned int kind: 10;
683 1.1 christos unsigned int unused: 21;
684 1.1 christos dnttpointer firstmem;
685 1.1 christos unsigned int bitlength;
686 1.1 christos };
687 1.1 christos
688 1.1 christos /* DNTT_TYPE_MEMENUM
689 1.1 christos
690 1.1 christos Used to describe members of an enumerated type.
691 1.1 christos
692 1.1 christos CLASSMEM is nonzero if this member is part of a class.
693 1.1 christos
694 1.1 christos NAME points into the VT for the name of this member.
695 1.1 christos
696 1.1 christos VALUE is the value of this enumeration member.
697 1.1 christos
698 1.1 christos NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */
699 1.1 christos
700 1.1 christos struct dntt_type_memenum
701 1.1 christos {
702 1.1 christos unsigned int extension: 1;
703 1.1 christos unsigned int kind: 10;
704 1.1 christos unsigned int classmem: 1;
705 1.1 christos unsigned int unused: 20;
706 1.1 christos vtpointer name;
707 1.1 christos unsigned int value;
708 1.1 christos dnttpointer nextmem;
709 1.1 christos };
710 1.1 christos
711 1.1 christos /* DNTT_TYPE_SET
712 1.1 christos
713 1.1 christos Used to describe PASCAL "set" type.
714 1.1 christos
715 1.1 christos DECLARATION describes the bitpacking of the set.
716 1.1 christos
717 1.1 christos SUBTYPE points to a DNTT entry describing the type of the members.
718 1.1 christos
719 1.1 christos BITLENGTH is the size of the set. */
720 1.1 christos
721 1.1 christos struct dntt_type_set
722 1.1 christos {
723 1.1 christos unsigned int extension: 1;
724 1.1 christos unsigned int kind: 10;
725 1.1 christos unsigned int declaration: 2;
726 1.1 christos unsigned int unused: 19;
727 1.1 christos dnttpointer subtype;
728 1.1 christos unsigned int bitlength;
729 1.1 christos };
730 1.1 christos
731 1.1 christos /* DNTT_TYPE_SUBRANGE
732 1.1 christos
733 1.1 christos Used to describe subrange type.
734 1.1 christos
735 1.1 christos DYN_LOW describes the lower bound of the subrange:
736 1.1 christos
737 1.1 christos 00 for a constant lower bound (found in LOWBOUND).
738 1.1 christos
739 1.1 christos 01 for a dynamic lower bound with the lower bound found in the
740 1.1 christos memory address pointed to by LOWBOUND.
741 1.1 christos
742 1.1 christos 10 for a dynamic lower bound described by an variable found in the
743 1.1 christos DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT).
744 1.1 christos
745 1.1 christos DYN_HIGH is similar to DYN_LOW, except it describes the upper bound.
746 1.1 christos
747 1.1 christos SUBTYPE points to the type of the subrange.
748 1.1 christos
749 1.1 christos BITLENGTH is the length in bits needed to describe the subrange's
750 1.1 christos values. */
751 1.1 christos
752 1.1 christos struct dntt_type_subrange
753 1.1 christos {
754 1.1 christos unsigned int extension: 1;
755 1.1 christos unsigned int kind: 10;
756 1.1 christos unsigned int dyn_low: 2;
757 1.1 christos unsigned int dyn_high: 2;
758 1.1 christos unsigned int unused: 17;
759 1.1 christos int lowbound;
760 1.1 christos int highbound;
761 1.1 christos dnttpointer subtype;
762 1.1 christos unsigned int bitlength;
763 1.1 christos };
764 1.1 christos
765 1.1 christos /* DNTT_TYPE_ARRAY
766 1.1 christos
767 1.1 christos Used to describe an array type.
768 1.1 christos
769 1.1 christos DECLARATION describes the bit packing used in the array.
770 1.1 christos
771 1.1 christos ARRAYISBYTES is nonzero if the field in arraylength describes the
772 1.1 christos length in bytes rather than in bits. A value of zero is used to
773 1.1 christos describe an array with size 2**32.
774 1.1 christos
775 1.1 christos ELEMISBYTES is nonzero if the length if each element in the array
776 1.1 christos is describes in bytes rather than bits. A value of zero is used
777 1.1 christos to an element with size 2**32.
778 1.1 christos
779 1.1 christos ELEMORDER is nonzero if the elements are indexed in increasing order.
780 1.1 christos
781 1.1 christos JUSTIFIED if the elements are left justified to index zero.
782 1.1 christos
783 1.1 christos ARRAYLENGTH is the length of the array.
784 1.1 christos
785 1.1 christos INDEXTYPE is a DNTT pointer to the type used to index the array.
786 1.1 christos
787 1.1 christos ELEMTYPE is a DNTT pointer to the type for the array elements.
788 1.1 christos
789 1.1 christos ELEMLENGTH is the length of each element in the array (including
790 1.1 christos any padding).
791 1.1 christos
792 1.1 christos Multi-dimensional arrays are represented by ELEMTYPE pointing to
793 1.1 christos another DNTT_TYPE_ARRAY. */
794 1.1 christos
795 1.1 christos struct dntt_type_array
796 1.1 christos {
797 1.1 christos unsigned int extension: 1;
798 1.1 christos unsigned int kind: 10;
799 1.1 christos unsigned int declaration: 2;
800 1.1 christos unsigned int dyn_low: 2;
801 1.1 christos unsigned int dyn_high: 2;
802 1.1 christos unsigned int arrayisbytes: 1;
803 1.1 christos unsigned int elemisbytes: 1;
804 1.1 christos unsigned int elemorder: 1;
805 1.1 christos unsigned int justified: 1;
806 1.1 christos unsigned int unused: 11;
807 1.1 christos unsigned int arraylength;
808 1.1 christos dnttpointer indextype;
809 1.1 christos dnttpointer elemtype;
810 1.1 christos unsigned int elemlength;
811 1.1 christos };
812 1.1 christos
813 1.1 christos /* DNTT_TYPE_STRUCT
814 1.1 christos
815 1.1 christos DNTT_TYPE_STRUCT is used to describe a C structure.
816 1.1 christos
817 1.1 christos DECLARATION describes the bitpacking used.
818 1.1 christos
819 1.1 christos FIRSTFIELD is a DNTT pointer to the first field of the structure
820 1.1 christos (each field contains a pointer to the next field, walk the list
821 1.1 christos to access all fields of the structure).
822 1.1 christos
823 1.1 christos VARTAGFIELD and VARLIST are used for Pascal variant records.
824 1.1 christos
825 1.1 christos BITLENGTH is the size of the structure in bits. */
826 1.1 christos
827 1.1 christos struct dntt_type_struct
828 1.1 christos {
829 1.1 christos unsigned int extension: 1;
830 1.1 christos unsigned int kind: 10;
831 1.1 christos unsigned int declaration: 2;
832 1.1 christos unsigned int unused: 19;
833 1.1 christos dnttpointer firstfield;
834 1.1 christos dnttpointer vartagfield;
835 1.1 christos dnttpointer varlist;
836 1.1 christos unsigned int bitlength;
837 1.1 christos };
838 1.1 christos
839 1.1 christos /* DNTT_TYPE_UNION
840 1.1 christos
841 1.1 christos DNTT_TYPE_UNION is used to describe a C union.
842 1.1 christos
843 1.1 christos FIRSTFIELD is a DNTT pointer to the beginning of the field chain.
844 1.1 christos
845 1.1 christos BITLENGTH is the size of the union in bits. */
846 1.1 christos
847 1.1 christos struct dntt_type_union
848 1.1 christos {
849 1.1 christos unsigned int extension: 1;
850 1.1 christos unsigned int kind: 10;
851 1.1 christos unsigned int unused: 21;
852 1.1 christos dnttpointer firstfield;
853 1.1 christos unsigned int bitlength;
854 1.1 christos };
855 1.1 christos
856 1.1 christos /* DNTT_TYPE_FIELD
857 1.1 christos
858 1.1 christos DNTT_TYPE_FIELD describes one field in a structure or union
859 1.1 christos or C++ class.
860 1.1 christos
861 1.1 christos VISIBILITY is used to describe the visibility of the field
862 1.1 christos (for c++. public = 0, protected = 1, private = 2).
863 1.1 christos
864 1.1 christos A_UNION is nonzero if this field is a member of an anonymous union.
865 1.1 christos
866 1.1 christos STATICMEM is nonzero if this field is a static member of a template.
867 1.1 christos
868 1.1 christos NAME is a pointer into the VT for the name of the field.
869 1.1 christos
870 1.1 christos BITOFFSET gives the offset of this field in bits from the beginning
871 1.1 christos of the structure or union this field is a member of.
872 1.1 christos
873 1.1 christos TYPE is a DNTT pointer to the type describing this field.
874 1.1 christos
875 1.1 christos BITLENGTH is the size of the entry in bits.
876 1.1 christos
877 1.1 christos NEXTFIELD is a DNTT pointer to the next field in the chain. */
878 1.1 christos
879 1.1 christos struct dntt_type_field
880 1.1 christos {
881 1.1 christos unsigned int extension: 1;
882 1.1 christos unsigned int kind: 10;
883 1.1 christos unsigned int visibility: 2;
884 1.1 christos unsigned int a_union: 1;
885 1.1 christos unsigned int staticmem: 1;
886 1.1 christos unsigned int unused: 17;
887 1.1 christos vtpointer name;
888 1.1 christos unsigned int bitoffset;
889 1.1 christos dnttpointer type;
890 1.1 christos unsigned int bitlength;
891 1.1 christos dnttpointer nextfield;
892 1.1 christos };
893 1.1 christos
894 1.1 christos /* DNTT_TYPE_VARIANT is unused by GDB. */
895 1.1 christos /* DNTT_TYPE_FILE is unused by GDB. */
896 1.1 christos
897 1.1 christos /* DNTT_TYPE_FUNCTYPE
898 1.1 christos
899 1.1 christos I think this is used to describe a function type (e.g., would
900 1.1 christos be emitted as part of a function-pointer description).
901 1.1 christos
902 1.1 christos VARARGS is nonzero if this function uses varargs.
903 1.1 christos
904 1.1 christos FIRSTPARAM is a DNTT pointer to the first entry in the parameter
905 1.1 christos chain.
906 1.1 christos
907 1.1 christos RETVAL is a DNTT pointer to the type of the return value. */
908 1.1 christos
909 1.1 christos struct dntt_type_functype
910 1.1 christos {
911 1.1 christos unsigned int extension: 1;
912 1.1 christos unsigned int kind: 10;
913 1.1 christos unsigned int varargs: 1;
914 1.1 christos unsigned int info: 4;
915 1.1 christos unsigned int unused: 16;
916 1.1 christos unsigned int bitlength;
917 1.1 christos dnttpointer firstparam;
918 1.1 christos dnttpointer retval;
919 1.1 christos };
920 1.1 christos
921 1.1 christos /* DNTT_TYPE_WITH is emitted by C++ to indicate "with" scoping semantics.
922 1.1 christos (Probably also emitted by PASCAL to support "with"...).
923 1.1 christos
924 1.1 christos C++ example: Say "memfunc" is a method of class "c", and say
925 1.1 christos "m" is a data member of class "c". Then from within "memfunc",
926 1.1 christos it is legal to reference "m" directly (e.g. you don't have to
927 1.1 christos say "this->m". The symbol table indicates
928 1.1 christos this by emitting a DNTT_TYPE_WITH symbol within the function "memfunc",
929 1.1 christos pointing to the type symbol for class "c".
930 1.1 christos
931 1.1 christos In GDB, this symbol record is unnecessary,
932 1.1 christos because GDB's symbol lookup algorithm
933 1.1 christos infers the "with" semantics when it sees a "this" argument to the member
934 1.1 christos function. So GDB can safely ignore the DNTT_TYPE_WITH record.
935 1.1 christos
936 1.1 christos A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */
937 1.1 christos
938 1.1 christos struct dntt_type_with
939 1.1 christos {
940 1.1 christos unsigned int extension: 1; /* always zero */
941 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_WITH */
942 1.1 christos unsigned int addrtype: 2; /* 0 => STATTYPE */
943 1.1 christos /* 1 => DYNTYPE */
944 1.1 christos /* 2 => REGTYPE */
945 1.1 christos unsigned int indirect: 1; /* 1 => pointer to object */
946 1.1 christos unsigned int longaddr: 1; /* 1 => in long pointer space */
947 1.1 christos unsigned int nestlevel: 6; /* # of nesting levels back */
948 1.1 christos unsigned int doc_ranges: 1; /* 1 => location is range list */
949 1.1 christos unsigned int unused: 10;
950 1.1 christos long location; /* where stored (allocated) */
951 1.1 christos sltpointer address;
952 1.1 christos dnttpointer type; /* type of with expression */
953 1.1 christos vtpointer name; /* name of with expression */
954 1.1 christos unsigned long offset; /* byte offset from location */
955 1.1 christos };
956 1.1 christos
957 1.1 christos /* DNTT_TYPE_COMMON is unsupported by GDB. */
958 1.1 christos /* A DNTT_TYPE_COMMON symbol must have a matching DNTT_TYPE_END symbol */
959 1.1 christos
960 1.1 christos /* DNTT_TYPE_COBSTRUCT is unsupported by GDB. */
961 1.1 christos /* DNTT_TYPE_XREF is unsupported by GDB. */
962 1.1 christos /* DNTT_TYPE_SA is unsupported by GDB. */
963 1.1 christos /* DNTT_TYPE_MACRO is unsupported by GDB */
964 1.1 christos
965 1.1 christos /* DNTT_TYPE_BLOCKDATA has the same structure as DNTT_TYPE_FUNCTION */
966 1.1 christos
967 1.1 christos /* The following are the C++ specific SOM records */
968 1.1 christos
969 1.1 christos /* The purpose of the DNTT_TYPE_CLASS_SCOPE is to bracket C++ methods
970 1.1 christos and indicate the method name belongs in the "class scope" rather
971 1.1 christos than in the module they are being defined in. For example:
972 1.1 christos
973 1.1 christos class c {
974 1.1 christos ...
975 1.1 christos void memfunc(); // member function
976 1.1 christos };
977 1.1 christos
978 1.1 christos void c::memfunc() // definition of class c's "memfunc"
979 1.1 christos {
980 1.1 christos ...
981 1.1 christos }
982 1.1 christos
983 1.1 christos main()
984 1.1 christos {
985 1.1 christos ...
986 1.1 christos }
987 1.1 christos
988 1.1 christos In the above, the name "memfunc" is not directly visible from "main".
989 1.1 christos I.e., you have to say "break c::memfunc".
990 1.1 christos If it were a normal function (not a method), it would be visible
991 1.1 christos via the simple "break memfunc". Since "memfunc" otherwise looks
992 1.1 christos like a normal FUNCTION in the symbol table, the bracketing
993 1.1 christos CLASS_SCOPE is what is used to indicate it is really a method.
994 1.1 christos
995 1.1 christos
996 1.1 christos A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */
997 1.1 christos
998 1.1 christos struct dntt_type_class_scope
999 1.1 christos {
1000 1.1 christos unsigned int extension: 1; /* Always zero. */
1001 1.1 christos unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */
1002 1.1 christos unsigned int unused: 21;
1003 1.1 christos sltpointer address ; /* Pointer to SLT entry. */
1004 1.1 christos dnttpointer type ; /* Pointer to class type DNTT. */
1005 1.1 christos };
1006 1.1 christos
1007 1.1 christos /* C++ reference parameter.
1008 1.1 christos The structure of this record is the same as DNTT_TYPE_POINTER -
1009 1.1 christos refer to struct dntt_type_pointer. */
1010 1.1 christos
1011 1.1 christos /* The next two describe C++ pointer-to-data-member type, and
1012 1.1 christos pointer-to-member-function type, respectively.
1013 1.1 christos DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */
1014 1.1 christos
1015 1.1 christos struct dntt_type_ptrmem
1016 1.1 christos {
1017 1.1 christos unsigned int extension: 1; /* Always zero. */
1018 1.1 christos unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */
1019 1.1 christos unsigned int unused: 21;
1020 1.1 christos dnttpointer pointsto ; /* Pointer to class DNTT. */
1021 1.1 christos dnttpointer memtype ; /* Type of member. */
1022 1.1 christos };
1023 1.1 christos
1024 1.1 christos struct dntt_type_ptrmemfunc
1025 1.1 christos {
1026 1.1 christos unsigned int extension: 1; /* Always zero. */
1027 1.1 christos unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */
1028 1.1 christos unsigned int unused: 21;
1029 1.1 christos dnttpointer pointsto ; /* Pointer to class DNTT. */
1030 1.1 christos dnttpointer memtype ; /* Type of member. */
1031 1.1 christos };
1032 1.1 christos
1033 1.1 christos /* The DNTT_TYPE_CLASS symbol is emitted to describe a class type.
1034 1.1 christos "memberlist" points to a chained list of FIELD or GENFIELD records
1035 1.1 christos indicating the class members. "parentlist" points to a chained list
1036 1.1 christos of INHERITANCE records indicating classes from which we inherit
1037 1.1 christos fields. */
1038 1.1 christos
1039 1.1 christos struct dntt_type_class
1040 1.1 christos {
1041 1.1 christos unsigned int extension: 1; /* Always zero. */
1042 1.1 christos unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */
1043 1.1 christos unsigned int abstract: 1; /* Is this an abstract class? */
1044 1.1 christos unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */
1045 1.1 christos unsigned int expansion: 1; /* 1=template expansion. */
1046 1.1 christos unsigned int unused: 17;
1047 1.1 christos dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */
1048 1.1 christos unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */
1049 1.1 christos dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */
1050 1.1 christos unsigned long bitlength ; /* Total at this level. */
1051 1.1 christos dnttpointer identlist ; /* Ptr to chain of class ident's. */
1052 1.1 christos dnttpointer friendlist ; /* Ptr to K_FRIEND list. */
1053 1.1 christos dnttpointer templateptr ; /* Ptr to template. */
1054 1.1 christos dnttpointer nextexp ; /* Ptr to next expansion. */
1055 1.1 christos };
1056 1.1 christos
1057 1.1 christos /* Class members are indicated via either the FIELD record (for
1058 1.1 christos data members, same as for C struct fields), or by the GENFIELD record
1059 1.1 christos (for member functions). */
1060 1.1 christos
1061 1.1 christos struct dntt_type_genfield
1062 1.1 christos {
1063 1.1 christos unsigned int extension: 1; /* Always zero. */
1064 1.1 christos unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */
1065 1.1 christos unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */
1066 1.1 christos unsigned int a_union: 1; /* 1 => anonymous union member. */
1067 1.1 christos unsigned int unused: 18;
1068 1.1 christos dnttpointer field ; /* Pointer to field or qualifier. */
1069 1.1 christos dnttpointer nextfield ; /* Pointer to next field. */
1070 1.1 christos };
1071 1.1 christos
1072 1.1 christos /* C++ virtual functions. */
1073 1.1 christos
1074 1.1 christos struct dntt_type_vfunc
1075 1.1 christos {
1076 1.1 christos unsigned int extension: 1; /* always zero */
1077 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */
1078 1.1 christos unsigned int pure: 1; /* pure virtual function ? */
1079 1.1 christos unsigned int unused: 20;
1080 1.1 christos dnttpointer funcptr ; /* points to FUNCTION symbol */
1081 1.1 christos unsigned long vtbl_offset ; /* offset into vtbl for virtual */
1082 1.1 christos };
1083 1.1 christos
1084 1.1 christos /* Not precisely sure what this is intended for - DDE ignores it. */
1085 1.1 christos
1086 1.1 christos struct dntt_type_memaccess
1087 1.1 christos {
1088 1.1 christos unsigned int extension: 1; /* always zero */
1089 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */
1090 1.1 christos unsigned int unused: 21;
1091 1.1 christos dnttpointer classptr ; /* pointer to base class */
1092 1.1 christos dnttpointer field ; /* pointer field */
1093 1.1 christos };
1094 1.1 christos
1095 1.1 christos /* The DNTT_TYPE_INHERITANCE record describes derived classes.
1096 1.1 christos In particular, the "parentlist" field of the CLASS record points
1097 1.1 christos to a list of INHERITANCE records for classes from which we
1098 1.1 christos inherit members. */
1099 1.1 christos
1100 1.1 christos struct dntt_type_inheritance
1101 1.1 christos {
1102 1.1 christos unsigned int extension: 1; /* always zero */
1103 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */
1104 1.1 christos unsigned int Virtual: 1; /* virtual base class ? */
1105 1.1 christos unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */
1106 1.1 christos unsigned int unused: 18;
1107 1.1 christos dnttpointer classname ; /* first parent class, if any */
1108 1.1 christos unsigned long offset ; /* offset to start of base class */
1109 1.1 christos dnttpointer next ; /* pointer to next K_INHERITANCE */
1110 1.1 christos unsigned long future[2] ; /* padding to 3-word block end */
1111 1.1 christos };
1112 1.1 christos
1113 1.1 christos /* C++ "friend" classes ... */
1114 1.1 christos
1115 1.1 christos struct dntt_type_friend_class
1116 1.1 christos {
1117 1.1 christos unsigned int extension: 1; /* always zero */
1118 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */
1119 1.1 christos unsigned int unused: 21;
1120 1.1 christos dnttpointer classptr ; /* pointer to class DNTT */
1121 1.1 christos dnttpointer next ; /* next DNTT_FRIEND */
1122 1.1 christos };
1123 1.1 christos
1124 1.1 christos struct dntt_type_friend_func
1125 1.1 christos {
1126 1.1 christos unsigned int extension: 1; /* always zero */
1127 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */
1128 1.1 christos unsigned int unused: 21;
1129 1.1 christos dnttpointer funcptr ; /* pointer to function */
1130 1.1 christos dnttpointer classptr ; /* pointer to class DNTT */
1131 1.1 christos dnttpointer next ; /* next DNTT_FRIEND */
1132 1.1 christos unsigned long future[2] ; /* padding to 3-word block end */
1133 1.1 christos };
1134 1.1 christos
1135 1.1 christos /* DDE appears to ignore the DNTT_TYPE_MODIFIER record.
1136 1.1 christos It could perhaps be used to give better "ptype" output in GDB;
1137 1.1 christos otherwise it is probably safe for GDB to ignore it also. */
1138 1.1 christos
1139 1.1 christos struct dntt_type_modifier
1140 1.1 christos {
1141 1.1 christos unsigned int extension: 1; /* always zero */
1142 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */
1143 1.1 christos unsigned int m_const: 1; /* const */
1144 1.1 christos unsigned int m_static: 1; /* static */
1145 1.1 christos unsigned int m_void: 1; /* void */
1146 1.1 christos unsigned int m_volatile: 1; /* volatile */
1147 1.1 christos unsigned int m_duplicate: 1; /* duplicate */
1148 1.1 christos unsigned int unused: 16;
1149 1.1 christos dnttpointer type ; /* subtype */
1150 1.1 christos unsigned long future ; /* padding to 3-word block end */
1151 1.1 christos };
1152 1.1 christos
1153 1.1 christos /* I'm not sure what this was intended for - DDE ignores it. */
1154 1.1 christos
1155 1.1 christos struct dntt_type_object_id
1156 1.1 christos {
1157 1.1 christos unsigned int extension: 1; /* always zero */
1158 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */
1159 1.1 christos unsigned int indirect: 1; /* Is object_ident addr of addr? */
1160 1.1 christos unsigned int unused: 20;
1161 1.1 christos unsigned long object_ident ; /* object identifier */
1162 1.1 christos unsigned long offset ; /* offset to start of base class */
1163 1.1 christos dnttpointer next ; /* pointer to next K_OBJECT_ID */
1164 1.1 christos unsigned long segoffset ; /* for linker fixup */
1165 1.1 christos unsigned long future ; /* padding to 3-word block end */
1166 1.1 christos };
1167 1.1 christos
1168 1.1 christos /* No separate dntt_type_memfunc; same as dntt_type_func */
1169 1.1 christos
1170 1.1 christos /* Symbol records to support templates. These only get used
1171 1.1 christos in DDE's "describe" output (like GDB's "ptype"). */
1172 1.1 christos
1173 1.1 christos /* The TEMPLATE record is the header for a template-class.
1174 1.1 christos Like the CLASS record, a TEMPLATE record has a memberlist that
1175 1.1 christos points to a list of template members. It also has an arglist
1176 1.1 christos pointing to a list of TEMPLATE_ARG records. */
1177 1.1 christos
1178 1.1 christos struct dntt_type_template
1179 1.1 christos {
1180 1.1 christos unsigned int extension: 1; /* always zero */
1181 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */
1182 1.1 christos unsigned int abstract: 1; /* is this an abstract class? */
1183 1.1 christos unsigned int class_decl: 2; /* 0=class,1=union,2=struct */
1184 1.1 christos unsigned int unused: 18;
1185 1.1 christos dnttpointer memberlist ; /* ptr to chain of K_[GEN]FIELDs */
1186 1.1 christos long unused2 ; /* offset in obj of ptr to vtbl */
1187 1.1 christos dnttpointer parentlist ; /* ptr to K_INHERITANCE list */
1188 1.1 christos unsigned long bitlength ; /* total at this level */
1189 1.1 christos dnttpointer identlist ; /* ptr to chain of class ident's */
1190 1.1 christos dnttpointer friendlist ; /* ptr to K_FRIEND list */
1191 1.1 christos dnttpointer arglist ; /* ptr to argument list */
1192 1.1 christos dnttpointer expansions ; /* ptr to expansion list */
1193 1.1 christos };
1194 1.1 christos
1195 1.1 christos /* Template-class arguments are a list of TEMPL_ARG records
1196 1.1 christos chained together. The "name" field is the name of the formal.
1197 1.1 christos E.g.:
1198 1.1 christos
1199 1.1 christos template <class T> class q { ... };
1200 1.1 christos
1201 1.1 christos Then "T" is the name of the formal argument. */
1202 1.1 christos
1203 1.1 christos struct dntt_type_templ_arg
1204 1.1 christos {
1205 1.1 christos unsigned int extension: 1; /* always zero */
1206 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */
1207 1.1 christos unsigned int usagetype: 1; /* 0 type-name 1 expression */
1208 1.1 christos unsigned int unused: 20;
1209 1.1 christos vtpointer name ; /* name of argument */
1210 1.1 christos dnttpointer type ; /* for non type arguments */
1211 1.1 christos dnttpointer nextarg ; /* Next argument if any */
1212 1.1 christos long future[2] ; /* padding to 3-word block end */
1213 1.1 christos };
1214 1.1 christos
1215 1.1 christos /* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted
1216 1.1 christos for template member functions. E.g.,
1217 1.1 christos
1218 1.1 christos template <class T> class q
1219 1.1 christos {
1220 1.1 christos ...
1221 1.1 christos void f();
1222 1.1 christos ...
1223 1.1 christos };
1224 1.1 christos
1225 1.1 christos Within the list of FIELDs/GENFIELDs defining the member list
1226 1.1 christos of the template "q", "f" would appear as a FUNC_TEMPLATE.
1227 1.1 christos We'll also see instances of FUNCTION "f" records for each
1228 1.1 christos instantiation of the template. */
1229 1.1 christos
1230 1.1 christos struct dntt_type_func_template
1231 1.1 christos {
1232 1.1 christos unsigned int extension: 1; /* always zero */
1233 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */
1234 1.1 christos unsigned int public: 1; /* 1 => globally visible */
1235 1.1 christos unsigned int language: 4; /* type of language */
1236 1.1 christos unsigned int level: 5; /* nesting level (top level = 0)*/
1237 1.1 christos unsigned int optimize: 2; /* level of optimization */
1238 1.1 christos unsigned int varargs: 1; /* ellipses. Pascal/800 later */
1239 1.1 christos unsigned int info: 4; /* lang-specific stuff; F_xxxx */
1240 1.1 christos unsigned int inlined: 1;
1241 1.1 christos unsigned int localloc: 1; /* 0 at top, 1 at end of block */
1242 1.1 christos unsigned int unused: 2;
1243 1.1 christos vtpointer name ; /* name of function */
1244 1.1 christos vtpointer alias ; /* alternate name, if any */
1245 1.1 christos dnttpointer firstparam ; /* first FPARAM, if any */
1246 1.1 christos dnttpointer retval ; /* return type, if any */
1247 1.1 christos dnttpointer arglist ; /* ptr to argument list */
1248 1.1 christos };
1249 1.1 christos
1250 1.1 christos /* LINK is apparently intended to link together function template
1251 1.1 christos definitions with their instantiations. However, it is not clear
1252 1.1 christos why this would be needed, except to provide the information on
1253 1.1 christos a "ptype" command. And as far as I can tell, aCC does not
1254 1.1 christos generate this record. */
1255 1.1 christos
1256 1.1 christos struct dntt_type_link
1257 1.1 christos {
1258 1.1 christos unsigned int extension: 1; /* always zero */
1259 1.1 christos unsigned int kind: 10; /* always DNTT_TYPE_LINK */
1260 1.1 christos unsigned int linkKind: 4; /* always LINK_UNKNOWN */
1261 1.1 christos unsigned int unused: 17;
1262 1.1 christos long future1 ; /* expansion */
1263 1.1 christos dnttpointer ptr1 ; /* link from template */
1264 1.1 christos dnttpointer ptr2 ; /* to expansion */
1265 1.1 christos long future[2] ; /* padding to 3-word block end */
1266 1.1 christos };
1267 1.1 christos
1268 1.1 christos /* end of C++ specific SOM's. */
1269 1.1 christos
1270 1.1 christos /* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */
1271 1.1 christos /* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */
1272 1.1 christos /* DNTT_TYPE_BEGIN_EXT is unused by GDB */
1273 1.1 christos /* DNTT_TYPE_INLN is unused by GDB */
1274 1.1 christos /* DNTT_TYPE_INLN_LIST is unused by GDB */
1275 1.1 christos /* DNTT_TYPE_ALIAS is unused by GDB */
1276 1.1 christos
1277 1.1 christos struct dntt_type_doc_function
1278 1.1 christos {
1279 1.1 christos unsigned int extension: 1; /* always zero */
1280 1.1 christos unsigned int kind: 10; /* K_DOC_FUNCTION or */
1281 1.1 christos /* K_DOC_MEMFUNC */
1282 1.1 christos unsigned int global: 1; /* 1 => globally visible */
1283 1.1 christos unsigned int language: 4; /* type of language */
1284 1.1 christos unsigned int level: 5; /* nesting level (top level = 0)*/
1285 1.1 christos unsigned int optimize: 2; /* level of optimization */
1286 1.1 christos unsigned int varargs: 1; /* ellipses. Pascal/800 later */
1287 1.1 christos unsigned int info: 4; /* lang-specific stuff; F_xxxx */
1288 1.1 christos unsigned int inlined: 1;
1289 1.1 christos unsigned int localloc: 1; /* 0 at top, 1 at end of block */
1290 1.1 christos unsigned int expansion: 1; /* 1 = function expansion */
1291 1.1 christos unsigned int doc_clone: 1;
1292 1.1 christos vtpointer name; /* name of function */
1293 1.1 christos vtpointer alias; /* alternate name, if any */
1294 1.1 christos dnttpointer firstparam; /* first FPARAM, if any */
1295 1.1 christos sltpointer address; /* code and text locations */
1296 1.1 christos CORE_ADDR entryaddr; /* address of entry point */
1297 1.1 christos dnttpointer retval; /* return type, if any */
1298 1.1 christos CORE_ADDR lowaddr; /* lowest address of function */
1299 1.1 christos CORE_ADDR hiaddr; /* highest address of function */
1300 1.1 christos dnttpointer inline_list; /* pointer to first inline */
1301 1.1 christos ltpointer lt_offset; /* start of frag/cp line table */
1302 1.1 christos ctxtpointer ctxt_offset; /* start of context table for this routine */
1303 1.1 christos };
1304 1.1 christos
1305 1.1 christos /* DNTT_TYPE_DOC_MEMFUNC is unused by GDB */
1306 1.1 christos
1307 1.1 christos /* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures
1308 1.1 christos so we can examine a DNTT entry in a generic fashion. */
1309 1.1 christos struct dntt_type_generic
1310 1.1 christos {
1311 1.1 christos unsigned int word[9];
1312 1.1 christos };
1313 1.1 christos
1314 1.1 christos struct dntt_type_block
1315 1.1 christos {
1316 1.1 christos unsigned int extension: 1;
1317 1.1 christos unsigned int kind: 10;
1318 1.1 christos unsigned int unused: 21;
1319 1.1 christos unsigned int word[2];
1320 1.1 christos };
1321 1.1 christos
1322 1.1 christos /* One entry in a DNTT (either the LNTT or GNTT).
1323 1.1 christos This is a union of the above 60 or so structure definitions. */
1324 1.1 christos
1325 1.1 christos union dnttentry
1326 1.1 christos {
1327 1.1 christos struct dntt_type_srcfile dsfile;
1328 1.1 christos struct dntt_type_module dmodule;
1329 1.1 christos struct dntt_type_function dfunc;
1330 1.1 christos struct dntt_type_function dentry;
1331 1.1 christos struct dntt_type_begin dbegin;
1332 1.1 christos struct dntt_type_end dend;
1333 1.1 christos struct dntt_type_fparam dfparam;
1334 1.1 christos struct dntt_type_svar dsvar;
1335 1.1 christos struct dntt_type_dvar ddvar;
1336 1.1 christos struct dntt_type_const dconst;
1337 1.1 christos struct dntt_type_type dtype;
1338 1.1 christos struct dntt_type_type dtag;
1339 1.1 christos struct dntt_type_pointer dptr;
1340 1.1 christos struct dntt_type_enum denum;
1341 1.1 christos struct dntt_type_memenum dmember;
1342 1.1 christos struct dntt_type_set dset;
1343 1.1 christos struct dntt_type_subrange dsubr;
1344 1.1 christos struct dntt_type_array darray;
1345 1.1 christos struct dntt_type_struct dstruct;
1346 1.1 christos struct dntt_type_union dunion;
1347 1.1 christos struct dntt_type_field dfield;
1348 1.1 christos struct dntt_type_functype dfunctype;
1349 1.1 christos struct dntt_type_with dwith;
1350 1.1 christos struct dntt_type_function dblockdata;
1351 1.1 christos struct dntt_type_class_scope dclass_scope;
1352 1.1 christos struct dntt_type_pointer dreference;
1353 1.1 christos struct dntt_type_ptrmem dptrmem;
1354 1.1 christos struct dntt_type_ptrmemfunc dptrmemfunc;
1355 1.1 christos struct dntt_type_class dclass;
1356 1.1 christos struct dntt_type_genfield dgenfield;
1357 1.1 christos struct dntt_type_vfunc dvfunc;
1358 1.1 christos struct dntt_type_memaccess dmemaccess;
1359 1.1 christos struct dntt_type_inheritance dinheritance;
1360 1.1 christos struct dntt_type_friend_class dfriend_class;
1361 1.1 christos struct dntt_type_friend_func dfriend_func;
1362 1.1 christos struct dntt_type_modifier dmodifier;
1363 1.1 christos struct dntt_type_object_id dobject_id;
1364 1.1 christos struct dntt_type_template dtemplate;
1365 1.1 christos struct dntt_type_templ_arg dtempl_arg;
1366 1.1 christos struct dntt_type_func_template dfunc_template;
1367 1.1 christos struct dntt_type_link dlink;
1368 1.1 christos struct dntt_type_doc_function ddocfunc;
1369 1.1 christos struct dntt_type_generic dgeneric;
1370 1.1 christos struct dntt_type_block dblock;
1371 1.1 christos };
1372 1.1 christos
1373 1.1 christos /* Source line entry types. */
1374 1.1 christos enum slttype
1375 1.1 christos {
1376 1.1 christos SLT_NORMAL,
1377 1.1 christos SLT_SRCFILE,
1378 1.1 christos SLT_MODULE,
1379 1.1 christos SLT_FUNCTION,
1380 1.1 christos SLT_ENTRY,
1381 1.1 christos SLT_BEGIN,
1382 1.1 christos SLT_END,
1383 1.1 christos SLT_WITH,
1384 1.1 christos SLT_EXIT,
1385 1.1 christos SLT_ASSIST,
1386 1.1 christos SLT_MARKER,
1387 1.1 christos SLT_CLASS_SCOPE,
1388 1.1 christos SLT_INLN,
1389 1.1 christos SLT_NORMAL_OFFSET,
1390 1.1 christos };
1391 1.1 christos
1392 1.1 christos /* A normal source line entry. Simply provides a mapping of a source
1393 1.1 christos line number to a code address.
1394 1.1 christos
1395 1.1 christos SLTDESC will always be SLT_NORMAL or SLT_EXIT. */
1396 1.1 christos
1397 1.1 christos struct slt_normal
1398 1.1 christos {
1399 1.1 christos unsigned int sltdesc: 4;
1400 1.1 christos unsigned int line: 28;
1401 1.1 christos CORE_ADDR address;
1402 1.1 christos };
1403 1.1 christos
1404 1.1 christos struct slt_normal_off
1405 1.1 christos {
1406 1.1 christos unsigned int sltdesc: 4;
1407 1.1 christos unsigned int offset: 6;
1408 1.1 christos unsigned int line: 22;
1409 1.1 christos CORE_ADDR address;
1410 1.1 christos };
1411 1.1 christos
1412 1.1 christos /* A special source line entry. Provides a mapping of a declaration
1413 1.1 christos to a line number. These entries point back into the DNTT which
1414 1.1 christos references them. */
1415 1.1 christos
1416 1.1 christos struct slt_special
1417 1.1 christos {
1418 1.1 christos unsigned int sltdesc: 4;
1419 1.1 christos unsigned int line: 28;
1420 1.1 christos dnttpointer backptr;
1421 1.1 christos };
1422 1.1 christos
1423 1.1 christos /* Used to describe nesting.
1424 1.1 christos
1425 1.1 christos For nested languages, an slt_assist entry must follow each SLT_FUNC
1426 1.1 christos entry in the SLT. The address field will point forward to the
1427 1.1 christos first slt_normal entry within the function's scope. */
1428 1.1 christos
1429 1.1 christos struct slt_assist
1430 1.1 christos {
1431 1.1 christos unsigned int sltdesc: 4;
1432 1.1 christos unsigned int unused: 28;
1433 1.1 christos sltpointer address;
1434 1.1 christos };
1435 1.1 christos
1436 1.1 christos struct slt_generic
1437 1.1 christos {
1438 1.1 christos unsigned int word[2];
1439 1.1 christos };
1440 1.1 christos
1441 1.1 christos union sltentry
1442 1.1 christos {
1443 1.1 christos struct slt_normal snorm;
1444 1.1 christos struct slt_normal_off snormoff;
1445 1.1 christos struct slt_special sspec;
1446 1.1 christos struct slt_assist sasst;
1447 1.1 christos struct slt_generic sgeneric;
1448 1.1 christos };
1449 1.1 christos
1450 1.1 christos /* $LINES$ declarations
1451 1.1 christos This is the line table used for optimized code, which is only present
1452 1.1 christos in the new $PROGRAM_INFO$ debug space. */
1453 1.1 christos
1454 1.1 christos #define DST_LN_ESCAPE_FLAG1 15
1455 1.1 christos #define DST_LN_ESCAPE_FLAG2 14
1456 1.1 christos #define DST_LN_CTX_SPEC1 13
1457 1.1 christos #define DST_LN_CTX_SPEC2 12
1458 1.1 christos
1459 1.1 christos /* Escape function codes: */
1460 1.1 christos
1461 1.1 christos typedef enum
1462 1.1 christos {
1463 1.1 christos dst_ln_pad, /* pad byte */
1464 1.1 christos dst_ln_escape_1, /* reserved */
1465 1.1 christos dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */
1466 1.1 christos dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */
1467 1.1 christos dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */
1468 1.1 christos dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */
1469 1.1 christos dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */
1470 1.1 christos dst_ln_ln_off, /* statement escape, stmt # = next byte */
1471 1.1 christos dst_ln_entry, /* entry escape, next byte is entry number */
1472 1.1 christos dst_ln_exit, /* exit escape */
1473 1.1 christos dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */
1474 1.1 christos dst_ln_stmt_cp, /* current stmt is a critical point */
1475 1.1 christos dst_ln_escape_12, /* reserved */
1476 1.1 christos dst_ln_escape_13, /* this is an exception site record */
1477 1.1 christos dst_ln_nxt_byte, /* next byte contains the real escape code */
1478 1.1 christos dst_ln_end, /* end escape, final entry follows */
1479 1.1 christos dst_ln_escape1_END_OF_ENUM
1480 1.1 christos }
1481 1.1 christos dst_ln_escape1_t;
1482 1.1 christos
1483 1.1 christos typedef enum
1484 1.1 christos {
1485 1.1 christos dst_ln_ctx_1, /* next byte describes context switch with 5-bit */
1486 1.1 christos /* index into the image table and 3-bit run length. */
1487 1.1 christos /* If run length is 0, end with another cxt specifier or ctx_end */
1488 1.1 christos dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */
1489 1.1 christos dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */
1490 1.1 christos dst_ln_ctx_end, /* end current context */
1491 1.1 christos dst_ln_col_run_1, /* next byte is column position of start of next statement, */
1492 1.1 christos /* following byte is length of statement */
1493 1.1 christos dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */
1494 1.1 christos /* following 2 bytes is length of statement */
1495 1.1 christos dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */
1496 1.1 christos dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */
1497 1.1 christos dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */
1498 1.1 christos dst_ln_escape2_END_OF_ENUM
1499 1.1 christos }
1500 1.1 christos dst_ln_escape2_t;
1501 1.1 christos
1502 1.1 christos typedef union
1503 1.1 christos {
1504 1.1 christos struct
1505 1.1 christos {
1506 1.1 christos unsigned int pc_delta : 4; /* 4 bit pc delta */
1507 1.1 christos int ln_delta : 4; /* 4 bit line number delta */
1508 1.1 christos }
1509 1.1 christos delta;
1510 1.1 christos
1511 1.1 christos struct
1512 1.1 christos {
1513 1.1 christos unsigned int esc_flag : 4; /* alias for pc_delta */
1514 1.1 christos unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */
1515 1.1 christos }
1516 1.1 christos esc;
1517 1.1 christos
1518 1.1 christos struct
1519 1.1 christos {
1520 1.1 christos unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */
1521 1.1 christos unsigned int run_length : 2;
1522 1.1 christos unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */
1523 1.1 christos }
1524 1.1 christos ctx_spec;
1525 1.1 christos
1526 1.1 christos char sdata; /* signed data byte */
1527 1.1 christos unsigned char udata; /* unsigned data byte */
1528 1.1 christos }
1529 1.1 christos dst_ln_entry_t,
1530 1.1 christos * dst_ln_entry_ptr_t;
1531 1.1 christos
1532 1.1 christos /* Warning: although the above union occupies only 1 byte the compiler treats
1533 1.1 christos it as having size 2 (the minimum size of a struct). Therefore a sequence of
1534 1.1 christos dst_ln_entry_t's cannot be described as an array, and walking through such a
1535 1.1 christos sequence requires convoluted code such as
1536 1.1 christos ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1
1537 1.1 christos We regret the inconvenience. */
1538 1.1 christos
1539 1.1 christos /* Structure for interpreting the byte following a dst_ln_ctx1 entry. */
1540 1.1 christos typedef struct
1541 1.1 christos {
1542 1.1 christos unsigned int ctx1_index : 5; /* 5 bit index into context table */
1543 1.1 christos unsigned int ctx1_run_length : 3; /* 3 bit run length */
1544 1.1 christos } dst_ln_ctx1_t,
1545 1.1 christos *dst_ln_ctx1_ptr_t;
1546 1.1 christos
1547 1.1 christos /* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */
1548 1.1 christos typedef struct
1549 1.1 christos {
1550 1.1 christos unsigned int ctx2_index : 13; /* 13 bit index into context table */
1551 1.1 christos unsigned int ctx2_run_length : 3; /* 3 bit run length */
1552 1.1 christos } dst_ln_ctx2_t,
1553 1.1 christos *dst_ln_ctx2_ptr_t;
1554 1.1 christos
1555 1.1 christos /* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */
1556 1.1 christos typedef struct
1557 1.1 christos {
1558 1.1 christos unsigned int ctx4_index : 29; /* 29 bit index into context table */
1559 1.1 christos unsigned int ctx4_run_length : 3; /* 3 bit run length */
1560 1.1 christos } dst_ln_ctx4_t,
1561 1.1 christos *dst_ln_ctx4_ptr_t;
1562 1.1 christos
1563 1.1 christos
1564 1.1 christos /* PXDB definitions.
1565 1.1 christos
1566 1.1 christos PXDB is a post-processor which takes the executable file
1567 1.1 christos and massages the debug information so that the debugger may
1568 1.1 christos start up and run more efficiently. Some of the tasks
1569 1.1 christos performed by PXDB are:
1570 1.1 christos
1571 1.1 christos o Remove duplicate global type and variable information
1572 1.1 christos from the GNTT,
1573 1.1 christos
1574 1.1 christos o Append the GNTT onto the end of the LNTT and place both
1575 1.1 christos back in the LNTT section,
1576 1.1 christos
1577 1.1 christos o Build quick look-up tables (description follows) for
1578 1.1 christos files, procedures, modules, and paragraphs (for Cobol),
1579 1.1 christos placing these in the GNTT section,
1580 1.1 christos
1581 1.1 christos o Reconstruct the header appearing in the header section
1582 1.1 christos to access this information.
1583 1.1 christos
1584 1.1 christos The "quick look-up" tables are in the $GNTT$ sub-space, in
1585 1.1 christos the following order:
1586 1.1 christos
1587 1.1 christos Procedures -sorted by address
1588 1.1 christos Source files -sorted by address (of the
1589 1.1 christos generated code from routines)
1590 1.1 christos Modules -sorted by address
1591 1.1 christos Classes -<unsorted?>
1592 1.1 christos Address Alias -sorted by index <?>
1593 1.1 christos Object IDs -sorted by object identifier
1594 1.1 christos
1595 1.1 christos Most quick entries have (0-based) indices into the LNTT tables to
1596 1.1 christos the full entries for the item it describes.
1597 1.1 christos
1598 1.1 christos The post-PXDB header is in the $HEADER$ sub-space. Alas, it
1599 1.1 christos occurs in different forms, depending on the optimization level
1600 1.1 christos in the compilation step and whether PXDB was run or not. The
1601 1.1 christos worst part is the forms aren't self-describing, so we'll have
1602 1.1 christos to grovel in the bits to figure out what kind we're looking at
1603 1.1 christos (see hp_get_header in hp-psymtab-read.c). */
1604 1.1 christos
1605 1.1 christos /* PXDB versions. */
1606 1.1 christos
1607 1.1 christos #define PXDB_VERSION_CPLUSPLUS 1
1608 1.1 christos #define PXDB_VERSION_7_4 2
1609 1.1 christos #define PXDB_VERSION_CPP_30 3
1610 1.1 christos #define PXDB_VERSION_DDE_3_2A 4
1611 1.1 christos #define PXDB_VERSION_DDE_3_2 5
1612 1.1 christos #define PXDB_VERSION_DDE_4_0 6
1613 1.1 christos
1614 1.1 christos #define PXDB_VERSION_2_1 1
1615 1.1 christos
1616 1.1 christos /* Header version for the case that there is no DOC info
1617 1.1 christos but the executable has been processed by pxdb (the easy
1618 1.1 christos case, from "cc -g"). */
1619 1.1 christos
1620 1.1 christos typedef struct PXDB_struct
1621 1.1 christos {
1622 1.1 christos int pd_entries; /* # of entries in function look-up table */
1623 1.1 christos int fd_entries; /* # of entries in file look-up table */
1624 1.1 christos int md_entries; /* # of entries in module look-up table */
1625 1.1 christos unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
1626 1.1 christos unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
1627 1.1 christos unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
1628 1.1 christos /* used for version check in xdb */
1629 1.1 christos unsigned int inlined: 1; /* one or more functions have been inlined */
1630 1.1 christos unsigned int spare:12;
1631 1.1 christos short version; /* pxdb header version */
1632 1.1 christos int globals; /* index into the DNTT where GNTT begins */
1633 1.1 christos unsigned int time; /* modify time of file before being pxdbed */
1634 1.1 christos int pg_entries; /* # of entries in label look-up table */
1635 1.1 christos int functions; /* actual number of functions */
1636 1.1 christos int files; /* actual number of files */
1637 1.1 christos int cd_entries; /* # of entries in class look-up table */
1638 1.1 christos int aa_entries; /* # of entries in addr alias look-up table */
1639 1.1 christos int oi_entries; /* # of entries in object id look-up table */
1640 1.1 christos } PXDB_header, *PXDB_header_ptr;
1641 1.1 christos
1642 1.1 christos /* Header version for the case that there is no DOC info and the
1643 1.1 christos executable has NOT been processed by pxdb. */
1644 1.1 christos
1645 1.1 christos typedef struct XDB_header_struct
1646 1.1 christos {
1647 1.1 christos long gntt_length;
1648 1.1 christos long lntt_length;
1649 1.1 christos long slt_length;
1650 1.1 christos long vt_length;
1651 1.1 christos long xt_length;
1652 1.1 christos } XDB_header;
1653 1.1 christos
1654 1.1 christos /* Header version for the case that there is DOC info and the
1655 1.1 christos executable has been processed by pxdb. */
1656 1.1 christos
1657 1.1 christos typedef struct DOC_info_PXDB_header_struct
1658 1.1 christos {
1659 1.1 christos unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
1660 1.1 christos unsigned int doc_header: 1; /* bit set if this is doc-style header */
1661 1.1 christos unsigned int version: 8; /* version of pxdb see defines
1662 1.1 christos PXDB_VERSION_* in this file. */
1663 1.1 christos unsigned int reserved_for_flags: 16;/* for future use; -- must be
1664 1.1 christos set to zero. */
1665 1.1 christos unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */
1666 1.1 christos unsigned int has_expr_table: 1; /* space has $EXPR$ */
1667 1.1 christos unsigned int has_range_table: 1; /* space has $RANGE$ */
1668 1.1 christos unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */
1669 1.1 christos unsigned int has_lines_table: 1; /* space contains a $LINES$
1670 1.1 christos subspace for line tables. */
1671 1.1 christos unsigned int has_lt_offset_map: 1; /* space contains an lt_offset
1672 1.1 christos subspace for line table mapping. */
1673 1.1 christos /* The following fields are the same as those in the PXDB_header in $DEBUG$ */
1674 1.1 christos int pd_entries; /* # of entries in function look-up table */
1675 1.1 christos int fd_entries; /* # of entries in file look-up table */
1676 1.1 christos int md_entries; /* # of entries in module look-up table */
1677 1.1 christos unsigned int pxdbed : 1; /* 1 => file has been preprocessed */
1678 1.1 christos unsigned int bighdr : 1; /* 1 => this header contains 'time' word */
1679 1.1 christos unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */
1680 1.1 christos /* used for version check in xdb */
1681 1.1 christos unsigned int inlined: 1; /* one or more functions have been inlined */
1682 1.1 christos unsigned int spare : 28;
1683 1.1 christos int globals; /* index into the DNTT where GNTT begins */
1684 1.1 christos unsigned int time; /* modify time of file before being pxdbed */
1685 1.1 christos int pg_entries; /* # of entries in label look-up table */
1686 1.1 christos int functions; /* actual number of functions */
1687 1.1 christos int files; /* actual number of files */
1688 1.1 christos int cd_entries; /* # of entries in class look-up table */
1689 1.1 christos int aa_entries; /* # of entries in addr alias look-up table */
1690 1.1 christos int oi_entries; /* # of entries in object id look-up table */
1691 1.1 christos } DOC_info_PXDB_header;
1692 1.1 christos
1693 1.1 christos /* Header version for the case that there is DOC info and the
1694 1.1 christos executable has NOT been processed by pxdb. */
1695 1.1 christos
1696 1.1 christos typedef struct DOC_info_header_struct
1697 1.1 christos {
1698 1.1 christos unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */
1699 1.1 christos unsigned int doc_header: 1; /* bit set if this is doc-style header*/
1700 1.1 christos unsigned int version: 8; /* version of debug/header
1701 1.1 christos format. For 10.0 the value
1702 1.1 christos will be 1. For "Davis" the value is 2. */
1703 1.1 christos unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */
1704 1.1 christos unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */
1705 1.1 christos unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */
1706 1.1 christos unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */
1707 1.1 christos unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */
1708 1.1 christos
1709 1.1 christos long gntt_length; /* same as old header */
1710 1.1 christos long lntt_length; /* same as old header */
1711 1.1 christos long slt_length; /* same as old header */
1712 1.1 christos long vt_length; /* same as old header */
1713 1.1 christos long xt_length; /* same as old header */
1714 1.1 christos long ctxt_length; /* present only if version >= 2 */
1715 1.1 christos long range_length; /* present only if version >= 2 */
1716 1.1 christos long expr_length; /* present only if version >= 2 */
1717 1.1 christos
1718 1.1 christos } DOC_info_header;
1719 1.1 christos
1720 1.1 christos typedef union GenericDebugHeader_union
1721 1.1 christos {
1722 1.1 christos PXDB_header no_doc;
1723 1.1 christos DOC_info_PXDB_header doc;
1724 1.1 christos XDB_header no_pxdb_no_doc;
1725 1.1 christos DOC_info_header no_pxdb_doc;
1726 1.1 christos } GenericDebugHeader;
1727 1.1 christos
1728 1.1 christos
1729 1.1 christos /* Procedure Descriptor:
1730 1.1 christos An element of the procedure quick look-up table. */
1731 1.1 christos
1732 1.1 christos typedef struct quick_procedure
1733 1.1 christos {
1734 1.1 christos long isym; /* 0-based index of first symbol
1735 1.1 christos for procedure in $LNTT$,
1736 1.1 christos i.e. the procedure itself. */
1737 1.1 christos CORE_ADDR adrStart; /* memory adr of start of proc */
1738 1.1 christos CORE_ADDR adrEnd; /* memory adr of end of proc */
1739 1.1 christos char *sbAlias; /* alias name of procedure */
1740 1.1 christos char *sbProc; /* real name of procedure */
1741 1.1 christos CORE_ADDR adrBp; /* address of entry breakpoint */
1742 1.1 christos CORE_ADDR adrExitBp; /* address of exit breakpoint */
1743 1.1 christos int icd; /* member of this class (index) */
1744 1.1 christos unsigned int ipd; /* index of template for this */
1745 1.1 christos /* function (index) */
1746 1.1 christos unsigned int unused: 5;
1747 1.1 christos unsigned int no_lt_offset: 1;/* no entry in lt_offset table */
1748 1.1 christos unsigned int fTemplate: 1; /* function template */
1749 1.1 christos unsigned int fExpansion: 1; /* function expansion */
1750 1.1 christos unsigned int linked : 1; /* linked with other expansions */
1751 1.1 christos unsigned int duplicate: 1; /* clone of another procedure */
1752 1.1 christos unsigned int overloaded:1; /* overloaded function */
1753 1.1 christos unsigned int member: 1; /* class member function */
1754 1.1 christos unsigned int constructor:1; /* constructor function */
1755 1.1 christos unsigned int destructor:1; /* destructor function */
1756 1.1 christos unsigned int Static: 1; /* static function */
1757 1.1 christos unsigned int Virtual: 1; /* virtual function */
1758 1.1 christos unsigned int constant: 1; /* constant function */
1759 1.1 christos unsigned int pure: 1; /* pure (virtual) function */
1760 1.1 christos unsigned int language: 4; /* procedure's language */
1761 1.1 christos unsigned int inlined: 1; /* function has been inlined */
1762 1.1 christos unsigned int Operator: 1; /* operator function */
1763 1.1 christos unsigned int stub: 1; /* bodyless function */
1764 1.1 christos unsigned int optimize: 2; /* optimization level */
1765 1.1 christos unsigned int level: 5; /* nesting level (top=0) */
1766 1.1 christos } quick_procedure_entry, *quick_procedure_entry_ptr;
1767 1.1 christos
1768 1.1 christos /* Source File Descriptor:
1769 1.1 christos An element of the source file quick look-up table. */
1770 1.1 christos
1771 1.1 christos typedef struct quick_source
1772 1.1 christos {
1773 1.1 christos long isym; /* 0-based index in $LNTT$ of
1774 1.1 christos first symbol for this file. */
1775 1.1 christos CORE_ADDR adrStart; /* mem adr of start of file's code */
1776 1.1 christos CORE_ADDR adrEnd; /* mem adr of end of file's code */
1777 1.1 christos char *sbFile; /* name of source file */
1778 1.1 christos unsigned int fHasDecl: 1; /* do we have a .d file? */
1779 1.1 christos unsigned int fWarned: 1; /* have warned about age problems? */
1780 1.1 christos unsigned int fSrcfile: 1; /* 0 => include 1=> source */
1781 1.1 christos unsigned short ilnMac; /* lines in file (0 if don't know) */
1782 1.1 christos int ipd; /* 0-based index of first procedure
1783 1.1 christos in this file, in the quick
1784 1.1 christos look-up table of procedures. */
1785 1.1 christos unsigned int *rgLn; /* line pointer array, if any */
1786 1.1 christos } quick_file_entry, *quick_file_entry_ptr;
1787 1.1 christos
1788 1.1 christos /* Module Descriptor:
1789 1.1 christos An element of the module quick reference table. */
1790 1.1 christos
1791 1.1 christos typedef struct quick_module
1792 1.1 christos {
1793 1.1 christos long isym; /* 0-based index of first
1794 1.1 christos symbol for module. */
1795 1.1 christos CORE_ADDR adrStart; /* adr of start of mod. */
1796 1.1 christos CORE_ADDR adrEnd; /* adr of end of mod. */
1797 1.1 christos char *sbAlias; /* alias name of module */
1798 1.1 christos char *sbMod; /* real name of module */
1799 1.1 christos unsigned int imports: 1; /* module have any imports? */
1800 1.1 christos unsigned int vars_in_front: 1; /* module globals in front? */
1801 1.1 christos unsigned int vars_in_gaps: 1; /* module globals in gaps? */
1802 1.1 christos unsigned int language: 4; /* type of language */
1803 1.1 christos unsigned int unused : 25;
1804 1.1 christos unsigned int unused2; /* space for future stuff */
1805 1.1 christos } quick_module_entry, *quick_module_entry_ptr;
1806 1.1 christos
1807 1.1 christos /* Auxiliary Procedure Descriptor:
1808 1.1 christos An element of the auxiliary procedure quick look-up table. */
1809 1.1 christos
1810 1.1 christos typedef struct quick_aux_procedure
1811 1.1 christos {
1812 1.1 christos long isym_inln; /* start on inline list for proc */
1813 1.1 christos long spare;
1814 1.1 christos } quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr;
1815 1.1 christos
1816 1.1 christos /* Paragraph Descriptor:
1817 1.1 christos An element of the paragraph quick look-up table. */
1818 1.1 christos
1819 1.1 christos typedef struct quick_paragraph
1820 1.1 christos {
1821 1.1 christos long isym; /* first symbol for label (index) */
1822 1.1 christos CORE_ADDR adrStart; /* memory adr of start of label */
1823 1.1 christos CORE_ADDR adrEnd; /* memory adr of end of label */
1824 1.1 christos char *sbLab; /* name of label */
1825 1.1 christos unsigned int inst; /* Used in xdb to store inst @ bp */
1826 1.1 christos unsigned int sect: 1; /* true = section, false = parag. */
1827 1.1 christos unsigned int unused: 31; /* future use */
1828 1.1 christos } quick_paragraph_entry, *quick_paragraph_entry_ptr;
1829 1.1 christos
1830 1.1 christos /* Class Descriptor:
1831 1.1 christos An element of the class quick look-up table. */
1832 1.1 christos
1833 1.1 christos typedef struct quick_class
1834 1.1 christos {
1835 1.1 christos char *sbClass; /* name of class */
1836 1.1 christos long isym; /* class symbol (tag) */
1837 1.1 christos unsigned int type : 2; /* 0=class, 1=union, 2=struct */
1838 1.1 christos unsigned int fTemplate : 1;/* class template */
1839 1.1 christos unsigned int expansion : 1;/* template expansion */
1840 1.1 christos unsigned int unused :28;
1841 1.1 christos sltpointer lowscope; /* beginning of defined scope */
1842 1.1 christos sltpointer hiscope; /* end of defined scope */
1843 1.1 christos } quick_class_entry, *quick_class_entry_ptr;
1844 1.1 christos
1845 1.1 christos /* Address Alias Entry
1846 1.1 christos An element of the address alias quick look-up table. */
1847 1.1 christos
1848 1.1 christos typedef struct quick_alias
1849 1.1 christos {
1850 1.1 christos CORE_ADDR low;
1851 1.1 christos CORE_ADDR high;
1852 1.1 christos int index;
1853 1.1 christos unsigned int unused : 31;
1854 1.1 christos unsigned int alternate : 1; /* alternate unnamed aliases? */
1855 1.1 christos } quick_alias_entry, *quick_alias_entry_ptr;
1856 1.1 christos
1857 1.1 christos /* Object Identification Entry
1858 1.1 christos An element of the object identification quick look-up table. */
1859 1.1 christos
1860 1.1 christos typedef struct quick_obj_ID
1861 1.1 christos {
1862 1.1 christos CORE_ADDR obj_ident; /* class identifier */
1863 1.1 christos long isym; /* class symbol */
1864 1.1 christos long offset; /* offset to object start */
1865 1.1 christos } quick_obj_ID_entry, *quick_obj_ID_entry_ptr;
1866 1.1 christos
1867 1.1 christos #endif /* HP_SYMTAB_INCLUDED */
1868