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