00001 /* Definitions and structures for reading debug symbols from the 00002 native HP C compiler. 00003 00004 Written by the Center for Software Science at the University of Utah 00005 and by Cygnus Support. 00006 00007 Copyright 1994, 1995, 1998, 1999, 2003 Free Software Foundation, Inc. 00008 00009 This program is free software; you can redistribute it and/or modify 00010 it under the terms of the GNU General Public License as published by 00011 the Free Software Foundation; either version 2 of the License, or 00012 (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 00022 00023 #ifndef HP_SYMTAB_INCLUDED 00024 #define HP_SYMTAB_INCLUDED 00025 00026 /* General information: 00027 00028 This header file defines and describes only the data structures 00029 necessary to read debug symbols produced by the HP C compiler, 00030 HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the 00031 SOM object file format. 00032 (For a full description of the debug format, ftp hpux-symtab.h from 00033 jaguar.cs.utah.edu:/dist). 00034 00035 Additional notes (Rich Title) 00036 This file is a reverse-engineered version of a file called 00037 "symtab.h" which exists internal to HP's Computer Languages Organization 00038 in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of 00039 the file is copyrighted and not distributed, it is necessary for 00040 GDB to use the reverse-engineered version that follows. 00041 Work was done by Cygnus to reverse-engineer the C subset of symtab.h. 00042 The WDB project has extended this to also contain the C++ 00043 symbol definitions, the F90 symbol definitions, 00044 and the DOC (debugging-optimized-code) symbol definitions. 00045 In some cases (the C++ symbol definitions) 00046 I have added internal documentation here that 00047 goes beyond what is supplied in HP's symtab.h. If we someday 00048 unify these files again, the extra comments should be merged back 00049 into HP's symtab.h. 00050 00051 ------------------------------------------------------------------- 00052 00053 Debug symbols are contained entirely within an unloadable space called 00054 $DEBUG$. $DEBUG$ contains several subspaces which group related 00055 debug symbols. 00056 00057 $GNTT$ contains information for global variables, types and contants. 00058 00059 $LNTT$ contains information for procedures (including nesting), scoping 00060 information, local variables, types, and constants. 00061 00062 $SLT$ contains source line information so that code addresses may be 00063 mapped to source lines. 00064 00065 $VT$ contains various strings and constants for named objects (variables, 00066 typedefs, functions, etc). Strings are stored as null-terminated character 00067 lists. Constants always begin on word boundaries. The first byte of 00068 the VT must be zero (a null string). 00069 00070 $XT$ is not currently used by GDB. 00071 00072 Many structures within the subspaces point to other structures within 00073 the same subspace, or to structures within a different subspace. These 00074 pointers are represented as a structure index from the beginning of 00075 the appropriate subspace. */ 00076 00077 /* Used to describe where a constant is stored. */ 00078 enum location_type 00079 { 00080 LOCATION_IMMEDIATE, 00081 LOCATION_PTR, 00082 LOCATION_VT, 00083 }; 00084 00085 /* Languages supported by this debug format. Within the data structures 00086 this type is limited to 4 bits for a maximum of 16 languages. */ 00087 enum hp_language 00088 { 00089 HP_LANGUAGE_UNKNOWN, 00090 HP_LANGUAGE_C, 00091 HP_LANGUAGE_FORTRAN, 00092 HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN, 00093 HP_LANGUAGE_PASCAL, 00094 HP_LANGUAGE_MODCAL, 00095 HP_LANGUAGE_COBOL, 00096 HP_LANGUAGE_BASIC, 00097 HP_LANGUAGE_ADA, 00098 HP_LANGUAGE_CPLUSPLUS, 00099 HP_LANGUAGE_DMPASCAL 00100 }; 00101 00102 00103 /* Basic data types available in this debug format. Within the data 00104 structures this type is limited to 5 bits for a maximum of 32 basic 00105 data types. */ 00106 enum hp_type 00107 { 00108 HP_TYPE_UNDEFINED, /* 0 */ 00109 HP_TYPE_BOOLEAN, /* 1 */ 00110 HP_TYPE_CHAR, /* 2 */ 00111 HP_TYPE_INT, /* 3 */ 00112 HP_TYPE_UNSIGNED_INT, /* 4 */ 00113 HP_TYPE_REAL, /* 5 */ 00114 HP_TYPE_COMPLEX, /* 6 */ 00115 HP_TYPE_STRING200, /* 7 */ 00116 HP_TYPE_LONGSTRING200, /* 8 */ 00117 HP_TYPE_TEXT, /* 9 */ 00118 HP_TYPE_FLABEL, /* 10 */ 00119 HP_TYPE_FTN_STRING_SPEC, /* 11 */ 00120 HP_TYPE_MOD_STRING_SPEC, /* 12 */ 00121 HP_TYPE_PACKED_DECIMAL, /* 13 */ 00122 HP_TYPE_REAL_3000, /* 14 */ 00123 HP_TYPE_MOD_STRING_3000, /* 15 */ 00124 HP_TYPE_ANYPOINTER, /* 16 */ 00125 HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */ 00126 HP_TYPE_LOCAL_ANYPOINTER, /* 18 */ 00127 HP_TYPE_COMPLEXS3000, /* 19 */ 00128 HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */ 00129 HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */ 00130 HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */ 00131 HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */ 00132 HP_TYPE_WIDE_CHAR, /* 24 */ 00133 HP_TYPE_LONG, /* 25 */ 00134 HP_TYPE_UNSIGNED_LONG, /* 26 */ 00135 HP_TYPE_DOUBLE, /* 27 */ 00136 HP_TYPE_TEMPLATE_ARG, /* 28 */ 00137 HP_TYPE_VOID /* 29 */ 00138 }; 00139 00140 /* An immediate name and type table entry. 00141 00142 extension and immediate will always be one. 00143 global will always be zero. 00144 hp_type is the basic type this entry describes. 00145 bitlength is the length in bits for the basic type. */ 00146 struct dnttp_immediate 00147 { 00148 unsigned int extension: 1; 00149 unsigned int immediate: 1; 00150 unsigned int global: 1; 00151 unsigned int type: 5; 00152 unsigned int bitlength: 24; 00153 }; 00154 00155 /* A nonimmediate name and type table entry. 00156 00157 extension will always be one. 00158 immediate will always be zero. 00159 if global is zero, this entry points into the LNTT 00160 if global is one, this entry points into the GNTT 00161 index is the index within the GNTT or LNTT for this entry. */ 00162 struct dnttp_nonimmediate 00163 { 00164 unsigned int extension: 1; 00165 unsigned int immediate: 1; 00166 unsigned int global: 1; 00167 unsigned int index: 29; 00168 }; 00169 00170 /* A pointer to an entry in the GNTT and LNTT tables. It has two 00171 forms depending on the type being described. 00172 00173 The immediate form is used for simple entries and is one 00174 word. 00175 00176 The nonimmediate form is used for complex entries and contains 00177 an index into the LNTT or GNTT which describes the entire type. 00178 00179 If a dnttpointer is -1, then it is a NIL entry. */ 00180 00181 #define DNTTNIL (-1) 00182 typedef union dnttpointer 00183 { 00184 struct dnttp_immediate dntti; 00185 struct dnttp_nonimmediate dnttp; 00186 int word; 00187 } dnttpointer; 00188 00189 /* An index into the source line table. As with dnttpointers, a sltpointer 00190 of -1 indicates a NIL entry. */ 00191 #define SLTNIL (-1) 00192 typedef int sltpointer; 00193 00194 /* Index into DOC (= "Debugging Optimized Code") line table. */ 00195 #define LTNIL (-1) 00196 typedef int ltpointer; 00197 00198 /* Index into context table. */ 00199 #define CTXTNIL (-1) 00200 typedef int ctxtpointer; 00201 00202 /* Unsigned byte offset into the VT. */ 00203 typedef unsigned int vtpointer; 00204 00205 /* A DNTT entry (used within the GNTT and LNTT). 00206 00207 DNTT entries are variable sized objects, but are always a multiple 00208 of 3 words (we call each group of 3 words a "block"). 00209 00210 The first bit in each block is an extension bit. This bit is zero 00211 for the first block of a DNTT entry. If the entry requires more 00212 than one block, then this bit is set to one in all blocks after 00213 the first one. */ 00214 00215 /* Each DNTT entry describes a particular debug symbol (beginning of 00216 a source file, a function, variables, structures, etc. 00217 00218 The type of the DNTT entry is stored in the "kind" field within the 00219 DNTT entry itself. */ 00220 00221 enum dntt_entry_type 00222 { 00223 DNTT_TYPE_NIL = -1, 00224 DNTT_TYPE_SRCFILE, 00225 DNTT_TYPE_MODULE, 00226 DNTT_TYPE_FUNCTION, 00227 DNTT_TYPE_ENTRY, 00228 DNTT_TYPE_BEGIN, 00229 DNTT_TYPE_END, 00230 DNTT_TYPE_IMPORT, 00231 DNTT_TYPE_LABEL, 00232 DNTT_TYPE_FPARAM, 00233 DNTT_TYPE_SVAR, 00234 DNTT_TYPE_DVAR, 00235 DNTT_TYPE_HOLE1, 00236 DNTT_TYPE_CONST, 00237 DNTT_TYPE_TYPEDEF, 00238 DNTT_TYPE_TAGDEF, 00239 DNTT_TYPE_POINTER, 00240 DNTT_TYPE_ENUM, 00241 DNTT_TYPE_MEMENUM, 00242 DNTT_TYPE_SET, 00243 DNTT_TYPE_SUBRANGE, 00244 DNTT_TYPE_ARRAY, 00245 DNTT_TYPE_STRUCT, 00246 DNTT_TYPE_UNION, 00247 DNTT_TYPE_FIELD, 00248 DNTT_TYPE_VARIANT, 00249 DNTT_TYPE_FILE, 00250 DNTT_TYPE_FUNCTYPE, 00251 DNTT_TYPE_WITH, 00252 DNTT_TYPE_COMMON, 00253 DNTT_TYPE_COBSTRUCT, 00254 DNTT_TYPE_XREF, 00255 DNTT_TYPE_SA, 00256 DNTT_TYPE_MACRO, 00257 DNTT_TYPE_BLOCKDATA, 00258 DNTT_TYPE_CLASS_SCOPE, 00259 DNTT_TYPE_REFERENCE, 00260 DNTT_TYPE_PTRMEM, 00261 DNTT_TYPE_PTRMEMFUNC, 00262 DNTT_TYPE_CLASS, 00263 DNTT_TYPE_GENFIELD, 00264 DNTT_TYPE_VFUNC, 00265 DNTT_TYPE_MEMACCESS, 00266 DNTT_TYPE_INHERITANCE, 00267 DNTT_TYPE_FRIEND_CLASS, 00268 DNTT_TYPE_FRIEND_FUNC, 00269 DNTT_TYPE_MODIFIER, 00270 DNTT_TYPE_OBJECT_ID, 00271 DNTT_TYPE_MEMFUNC, 00272 DNTT_TYPE_TEMPLATE, 00273 DNTT_TYPE_TEMPLATE_ARG, 00274 DNTT_TYPE_FUNC_TEMPLATE, 00275 DNTT_TYPE_LINK, 00276 DNTT_TYPE_DYN_ARRAY_DESC, 00277 DNTT_TYPE_DESC_SUBRANGE, 00278 DNTT_TYPE_BEGIN_EXT, 00279 DNTT_TYPE_INLN, 00280 DNTT_TYPE_INLN_LIST, 00281 DNTT_TYPE_ALIAS, 00282 DNTT_TYPE_DOC_FUNCTION, 00283 DNTT_TYPE_DOC_MEMFUNC, 00284 DNTT_TYPE_MAX 00285 }; 00286 00287 /* DNTT_TYPE_SRCFILE: 00288 00289 One DNTT_TYPE_SRCFILE symbol is output for the start of each source 00290 file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE 00291 entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers 00292 can determine what file a function was defined in. 00293 00294 LANGUAGE describes the source file's language. 00295 00296 NAME points to an VT entry providing the source file's name. 00297 00298 Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen 00299 by the compiler (ie they may be relative or absolute). C include files 00300 via <> inclusion must use absolute paths. 00301 00302 ADDRESS points to an SLT entry from which line number and code locations 00303 may be determined. */ 00304 00305 struct dntt_type_srcfile 00306 { 00307 unsigned int extension: 1; 00308 unsigned int kind: 10; /* DNTT_TYPE_SRCFILE */ 00309 unsigned int language: 4; 00310 unsigned int unused: 17; 00311 vtpointer name; 00312 sltpointer address; 00313 }; 00314 00315 /* DNTT_TYPE_MODULE: 00316 00317 A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal 00318 module or C source file. A module indicates a compilation unit 00319 for name-scoping purposes; in that regard there should be 00320 a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records. 00321 00322 Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol. 00323 00324 NAME points to a VT entry providing the module's name. Note C 00325 source files are considered nameless modules. 00326 00327 ALIAS point to a VT entry providing a secondary name. 00328 00329 ADDRESS points to an SLT entry from which line number and code locations 00330 may be determined. */ 00331 00332 struct dntt_type_module 00333 { 00334 unsigned int extension: 1; 00335 unsigned int kind: 10; /* DNTT_TYPE_MODULE */ 00336 unsigned int unused: 21; 00337 vtpointer name; 00338 vtpointer alias; 00339 dnttpointer unused2; 00340 sltpointer address; 00341 }; 00342 00343 /* DNTT_TYPE_FUNCTION, 00344 DNTT_TYPE_ENTRY, 00345 DNTT_TYPE_BLOCKDATA, 00346 DNTT_TYPE_MEMFUNC: 00347 00348 A DNTT_TYPE_FUNCTION symbol is emitted for each function definition; 00349 a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both 00350 symbols used the dntt_type_function structure. 00351 A DNTT_TYPE_BLOCKDATA symbol is emitted ...? 00352 A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++). 00353 00354 Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END. 00355 00356 GLOBAL is nonzero if the function has global scope. 00357 00358 LANGUAGE describes the function's source language. 00359 00360 OPT_LEVEL describes the optimization level the function was compiled 00361 with. 00362 00363 VARARGS is nonzero if the function uses varargs. 00364 00365 NAME points to a VT entry providing the function's name. 00366 00367 ALIAS points to a VT entry providing a secondary name for the function. 00368 00369 FIRSTPARAM points to a LNTT entry which describes the parameter list. 00370 00371 ADDRESS points to an SLT entry from which line number and code locations 00372 may be determined. 00373 00374 ENTRYADDR is the memory address corresponding the function's entry point 00375 00376 RETVAL points to a LNTT entry describing the function's return value. 00377 00378 LOWADDR is the lowest memory address associated with this function. 00379 00380 HIADDR is the highest memory address associated with this function. */ 00381 00382 struct dntt_type_function 00383 { 00384 unsigned int extension: 1; 00385 unsigned int kind: 10; /* DNTT_TYPE_FUNCTION, 00386 DNTT_TYPE_ENTRY, 00387 DNTT_TYPE_BLOCKDATA 00388 or DNTT_TYPE_MEMFUNC */ 00389 unsigned int global: 1; 00390 unsigned int language: 4; 00391 unsigned int nest_level: 5; 00392 unsigned int opt_level: 2; 00393 unsigned int varargs: 1; 00394 unsigned int lang_info: 4; 00395 unsigned int inlined: 1; 00396 unsigned int localalloc: 1; 00397 unsigned int expansion: 1; 00398 unsigned int unused: 1; 00399 vtpointer name; 00400 vtpointer alias; 00401 dnttpointer firstparam; 00402 sltpointer address; 00403 CORE_ADDR entryaddr; 00404 dnttpointer retval; 00405 CORE_ADDR lowaddr; 00406 CORE_ADDR hiaddr; 00407 }; 00408 00409 /* DNTT_TYPE_BEGIN: 00410 00411 A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope. 00412 Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol. 00413 00414 CLASSFLAG is nonzero if this is the beginning of a c++ class definition. 00415 00416 ADDRESS points to an SLT entry from which line number and code locations 00417 may be determined. */ 00418 00419 struct dntt_type_begin 00420 { 00421 unsigned int extension: 1; 00422 unsigned int kind: 10; 00423 unsigned int classflag: 1; 00424 unsigned int unused: 20; 00425 sltpointer address; 00426 }; 00427 00428 /* DNTT_TYPE_END: 00429 00430 A DNTT_TYPE_END symbol is emitted when closing a scope started by 00431 a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, DNTT_TYPE_WITH, 00432 DNTT_TYPE_COMMON, DNTT_TYPE_BEGIN, and DNTT_TYPE_CLASS_SCOPE symbols. 00433 00434 ENDKIND describes what type of scope the DNTT_TYPE_END is closing 00435 (one of the above 6 kinds). 00436 00437 CLASSFLAG is nonzero if this is the end of a c++ class definition. 00438 00439 ADDRESS points to an SLT entry from which line number and code locations 00440 may be determined. 00441 00442 BEGINSCOPE points to the LNTT entry which opened the scope. */ 00443 00444 struct dntt_type_end 00445 { 00446 unsigned int extension: 1; 00447 unsigned int kind: 10; 00448 unsigned int endkind: 10; 00449 unsigned int classflag: 1; 00450 unsigned int unused: 10; 00451 sltpointer address; 00452 dnttpointer beginscope; 00453 }; 00454 00455 /* DNTT_TYPE_IMPORT is unused by GDB. */ 00456 /* DNTT_TYPE_LABEL is unused by GDB. */ 00457 00458 /* DNTT_TYPE_FPARAM: 00459 00460 A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When 00461 chained together the symbols represent an argument list for a function. 00462 00463 REGPARAM is nonzero if this parameter was passed in a register. 00464 00465 INDIRECT is nonzero if this parameter is a pointer to the parameter 00466 (pass by reference or pass by value for large items). 00467 00468 LONGADDR is nonzero if the parameter is a 64bit pointer. 00469 00470 NAME is a pointer into the VT for the parameter's name. 00471 00472 LOCATION describes where the parameter is stored. Depending on the 00473 parameter type LOCATION could be a register number, or an offset 00474 from the stack pointer. 00475 00476 TYPE points to a NTT entry describing the type of this parameter. 00477 00478 NEXTPARAM points to the LNTT entry describing the next parameter. */ 00479 00480 struct dntt_type_fparam 00481 { 00482 unsigned int extension: 1; 00483 unsigned int kind: 10; 00484 unsigned int regparam: 1; 00485 unsigned int indirect: 1; 00486 unsigned int longaddr: 1; 00487 unsigned int copyparam: 1; 00488 unsigned int dflt: 1; 00489 unsigned int doc_ranges: 1; 00490 unsigned int misc_kind: 1; 00491 unsigned int unused: 14; 00492 vtpointer name; 00493 CORE_ADDR location; 00494 dnttpointer type; 00495 dnttpointer nextparam; 00496 int misc; 00497 }; 00498 00499 /* DNTT_TYPE_SVAR: 00500 00501 A DNTT_TYPE_SVAR is emitted to describe a variable in static storage. 00502 00503 GLOBAL is nonzero if the variable has global scope. 00504 00505 INDIRECT is nonzero if the variable is a pointer to an object. 00506 00507 LONGADDR is nonzero if the variable is in long pointer space. 00508 00509 STATICMEM is nonzero if the variable is a member of a class. 00510 00511 A_UNION is nonzero if the variable is an anonymous union member. 00512 00513 NAME is a pointer into the VT for the variable's name. 00514 00515 LOCATION provides the memory address for the variable. 00516 00517 TYPE is a pointer into either the GNTT or LNTT which describes 00518 the type of this variable. */ 00519 00520 struct dntt_type_svar 00521 { 00522 unsigned int extension: 1; 00523 unsigned int kind: 10; 00524 unsigned int global: 1; 00525 unsigned int indirect: 1; 00526 unsigned int longaddr: 1; 00527 unsigned int staticmem: 1; 00528 unsigned int a_union: 1; 00529 unsigned int unused1: 1; 00530 unsigned int thread_specific: 1; 00531 unsigned int unused2: 14; 00532 vtpointer name; 00533 CORE_ADDR location; 00534 dnttpointer type; 00535 unsigned int offset; 00536 unsigned int displacement; 00537 }; 00538 00539 /* DNTT_TYPE_DVAR: 00540 00541 A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables 00542 held in registers. 00543 00544 GLOBAL is nonzero if the variable has global scope. 00545 00546 INDIRECT is nonzero if the variable is a pointer to an object. 00547 00548 REGVAR is nonzero if the variable is in a register. 00549 00550 A_UNION is nonzero if the variable is an anonymous union member. 00551 00552 NAME is a pointer into the VT for the variable's name. 00553 00554 LOCATION provides the memory address or register number for the variable. 00555 00556 TYPE is a pointer into either the GNTT or LNTT which describes 00557 the type of this variable. */ 00558 00559 struct dntt_type_dvar 00560 { 00561 unsigned int extension: 1; 00562 unsigned int kind: 10; 00563 unsigned int global: 1; 00564 unsigned int indirect: 1; 00565 unsigned int regvar: 1; 00566 unsigned int a_union: 1; 00567 unsigned int unused: 17; 00568 vtpointer name; 00569 int location; 00570 dnttpointer type; 00571 unsigned int offset; 00572 }; 00573 00574 /* DNTT_TYPE_CONST: 00575 00576 A DNTT_TYPE_CONST symbol is emitted for program constants. 00577 00578 GLOBAL is nonzero if the constant has global scope. 00579 00580 INDIRECT is nonzero if the constant is a pointer to an object. 00581 00582 LOCATION_TYPE describes where to find the constant's value 00583 (in the VT, memory, or embedded in an instruction). 00584 00585 CLASSMEM is nonzero if the constant is a member of a class. 00586 00587 NAME is a pointer into the VT for the constant's name. 00588 00589 LOCATION provides the memory address, register number or pointer 00590 into the VT for the constant's value. 00591 00592 TYPE is a pointer into either the GNTT or LNTT which describes 00593 the type of this variable. */ 00594 00595 struct dntt_type_const 00596 { 00597 unsigned int extension: 1; 00598 unsigned int kind: 10; 00599 unsigned int global: 1; 00600 unsigned int indirect: 1; 00601 unsigned int location_type: 3; 00602 unsigned int classmem: 1; 00603 unsigned int unused: 15; 00604 vtpointer name; 00605 CORE_ADDR location; 00606 dnttpointer type; 00607 unsigned int offset; 00608 unsigned int displacement; 00609 }; 00610 00611 /* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF: 00612 00613 The same structure is used to describe typedefs and tagdefs. 00614 00615 DNTT_TYPE_TYPEDEFS are associated with C "typedefs". 00616 00617 DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum" 00618 tags, which may have the same name as a typedef in the same scope. 00619 Also they are associated with C++ "class" tags, which implicitly have 00620 the same name as the class type. 00621 00622 GLOBAL is nonzero if the typedef/tagdef has global scope. 00623 00624 TYPEINFO is used to determine if full type information is available 00625 for a tag. (usually 1, but can be zero for opaque types in C). 00626 00627 NAME is a pointer into the VT for the constant's name. 00628 00629 TYPE points to the underlying type for the typedef/tagdef in the 00630 GNTT or LNTT. */ 00631 00632 struct dntt_type_type 00633 { 00634 unsigned int extension: 1; 00635 unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or 00636 DNTT_TYPE_TAGDEF. */ 00637 unsigned int global: 1; 00638 unsigned int typeinfo: 1; 00639 unsigned int unused: 19; 00640 vtpointer name; 00641 dnttpointer type; /* Underlying type, which for TAGDEF's may be 00642 DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, 00643 DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS. 00644 For TYPEDEF's other underlying types 00645 are also possible. */ 00646 }; 00647 00648 /* DNTT_TYPE_POINTER: 00649 00650 Used to describe a pointer to an underlying type. 00651 00652 POINTSTO is a pointer into the GNTT or LNTT for the type which this 00653 pointer points to. 00654 00655 BITLENGTH is the length of the pointer (not the underlying type). */ 00656 00657 struct dntt_type_pointer 00658 { 00659 unsigned int extension: 1; 00660 unsigned int kind: 10; 00661 unsigned int unused: 21; 00662 dnttpointer pointsto; 00663 unsigned int bitlength; 00664 }; 00665 00666 00667 /* DNTT_TYPE_ENUM: 00668 00669 Used to describe enumerated types. 00670 00671 FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which 00672 describes the first member (and contains a pointer to the chain of 00673 members). 00674 00675 BITLENGTH is the number of bits used to hold the values of the enum's 00676 members. */ 00677 00678 struct dntt_type_enum 00679 { 00680 unsigned int extension: 1; 00681 unsigned int kind: 10; 00682 unsigned int unused: 21; 00683 dnttpointer firstmem; 00684 unsigned int bitlength; 00685 }; 00686 00687 /* DNTT_TYPE_MEMENUM 00688 00689 Used to describe members of an enumerated type. 00690 00691 CLASSMEM is nonzero if this member is part of a class. 00692 00693 NAME points into the VT for the name of this member. 00694 00695 VALUE is the value of this enumeration member. 00696 00697 NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */ 00698 00699 struct dntt_type_memenum 00700 { 00701 unsigned int extension: 1; 00702 unsigned int kind: 10; 00703 unsigned int classmem: 1; 00704 unsigned int unused: 20; 00705 vtpointer name; 00706 unsigned int value; 00707 dnttpointer nextmem; 00708 }; 00709 00710 /* DNTT_TYPE_SET 00711 00712 Used to describe PASCAL "set" type. 00713 00714 DECLARATION describes the bitpacking of the set. 00715 00716 SUBTYPE points to a DNTT entry describing the type of the members. 00717 00718 BITLENGTH is the size of the set. */ 00719 00720 struct dntt_type_set 00721 { 00722 unsigned int extension: 1; 00723 unsigned int kind: 10; 00724 unsigned int declaration: 2; 00725 unsigned int unused: 19; 00726 dnttpointer subtype; 00727 unsigned int bitlength; 00728 }; 00729 00730 /* DNTT_TYPE_SUBRANGE 00731 00732 Used to describe subrange type. 00733 00734 DYN_LOW describes the lower bound of the subrange: 00735 00736 00 for a constant lower bound (found in LOWBOUND). 00737 00738 01 for a dynamic lower bound with the lower bound found in the 00739 memory address pointed to by LOWBOUND. 00740 00741 10 for a dynamic lower bound described by an variable found in the 00742 DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT). 00743 00744 DYN_HIGH is similar to DYN_LOW, except it describes the upper bound. 00745 00746 SUBTYPE points to the type of the subrange. 00747 00748 BITLENGTH is the length in bits needed to describe the subrange's 00749 values. */ 00750 00751 struct dntt_type_subrange 00752 { 00753 unsigned int extension: 1; 00754 unsigned int kind: 10; 00755 unsigned int dyn_low: 2; 00756 unsigned int dyn_high: 2; 00757 unsigned int unused: 17; 00758 int lowbound; 00759 int highbound; 00760 dnttpointer subtype; 00761 unsigned int bitlength; 00762 }; 00763 00764 /* DNTT_TYPE_ARRAY 00765 00766 Used to describe an array type. 00767 00768 DECLARATION describes the bit packing used in the array. 00769 00770 ARRAYISBYTES is nonzero if the field in arraylength describes the 00771 length in bytes rather than in bits. A value of zero is used to 00772 describe an array with size 2**32. 00773 00774 ELEMISBYTES is nonzero if the length if each element in the array 00775 is describes in bytes rather than bits. A value of zero is used 00776 to an element with size 2**32. 00777 00778 ELEMORDER is nonzero if the elements are indexed in increasing order. 00779 00780 JUSTIFIED if the elements are left justified to index zero. 00781 00782 ARRAYLENGTH is the length of the array. 00783 00784 INDEXTYPE is a DNTT pointer to the type used to index the array. 00785 00786 ELEMTYPE is a DNTT pointer to the type for the array elements. 00787 00788 ELEMLENGTH is the length of each element in the array (including 00789 any padding). 00790 00791 Multi-dimensional arrays are represented by ELEMTYPE pointing to 00792 another DNTT_TYPE_ARRAY. */ 00793 00794 struct dntt_type_array 00795 { 00796 unsigned int extension: 1; 00797 unsigned int kind: 10; 00798 unsigned int declaration: 2; 00799 unsigned int dyn_low: 2; 00800 unsigned int dyn_high: 2; 00801 unsigned int arrayisbytes: 1; 00802 unsigned int elemisbytes: 1; 00803 unsigned int elemorder: 1; 00804 unsigned int justified: 1; 00805 unsigned int unused: 11; 00806 unsigned int arraylength; 00807 dnttpointer indextype; 00808 dnttpointer elemtype; 00809 unsigned int elemlength; 00810 }; 00811 00812 /* DNTT_TYPE_STRUCT 00813 00814 DNTT_TYPE_STRUCT is used to describe a C structure. 00815 00816 DECLARATION describes the bitpacking used. 00817 00818 FIRSTFIELD is a DNTT pointer to the first field of the structure 00819 (each field contains a pointer to the next field, walk the list 00820 to access all fields of the structure). 00821 00822 VARTAGFIELD and VARLIST are used for Pascal variant records. 00823 00824 BITLENGTH is the size of the structure in bits. */ 00825 00826 struct dntt_type_struct 00827 { 00828 unsigned int extension: 1; 00829 unsigned int kind: 10; 00830 unsigned int declaration: 2; 00831 unsigned int unused: 19; 00832 dnttpointer firstfield; 00833 dnttpointer vartagfield; 00834 dnttpointer varlist; 00835 unsigned int bitlength; 00836 }; 00837 00838 /* DNTT_TYPE_UNION 00839 00840 DNTT_TYPE_UNION is used to describe a C union. 00841 00842 FIRSTFIELD is a DNTT pointer to the beginning of the field chain. 00843 00844 BITLENGTH is the size of the union in bits. */ 00845 00846 struct dntt_type_union 00847 { 00848 unsigned int extension: 1; 00849 unsigned int kind: 10; 00850 unsigned int unused: 21; 00851 dnttpointer firstfield; 00852 unsigned int bitlength; 00853 }; 00854 00855 /* DNTT_TYPE_FIELD 00856 00857 DNTT_TYPE_FIELD describes one field in a structure or union 00858 or C++ class. 00859 00860 VISIBILITY is used to describe the visibility of the field 00861 (for c++. public = 0, protected = 1, private = 2). 00862 00863 A_UNION is nonzero if this field is a member of an anonymous union. 00864 00865 STATICMEM is nonzero if this field is a static member of a template. 00866 00867 NAME is a pointer into the VT for the name of the field. 00868 00869 BITOFFSET gives the offset of this field in bits from the beginning 00870 of the structure or union this field is a member of. 00871 00872 TYPE is a DNTT pointer to the type describing this field. 00873 00874 BITLENGTH is the size of the entry in bits. 00875 00876 NEXTFIELD is a DNTT pointer to the next field in the chain. */ 00877 00878 struct dntt_type_field 00879 { 00880 unsigned int extension: 1; 00881 unsigned int kind: 10; 00882 unsigned int visibility: 2; 00883 unsigned int a_union: 1; 00884 unsigned int staticmem: 1; 00885 unsigned int unused: 17; 00886 vtpointer name; 00887 unsigned int bitoffset; 00888 dnttpointer type; 00889 unsigned int bitlength; 00890 dnttpointer nextfield; 00891 }; 00892 00893 /* DNTT_TYPE_VARIANT is unused by GDB. */ 00894 /* DNTT_TYPE_FILE is unused by GDB. */ 00895 00896 /* DNTT_TYPE_FUNCTYPE 00897 00898 I think this is used to describe a function type (e.g., would 00899 be emitted as part of a function-pointer description). 00900 00901 VARARGS is nonzero if this function uses varargs. 00902 00903 FIRSTPARAM is a DNTT pointer to the first entry in the parameter 00904 chain. 00905 00906 RETVAL is a DNTT pointer to the type of the return value. */ 00907 00908 struct dntt_type_functype 00909 { 00910 unsigned int extension: 1; 00911 unsigned int kind: 10; 00912 unsigned int varargs: 1; 00913 unsigned int info: 4; 00914 unsigned int unused: 16; 00915 unsigned int bitlength; 00916 dnttpointer firstparam; 00917 dnttpointer retval; 00918 }; 00919 00920 /* DNTT_TYPE_WITH is emitted by C++ to indicate "with" scoping semantics. 00921 (Probably also emitted by PASCAL to support "with"...). 00922 00923 C++ example: Say "memfunc" is a method of class "c", and say 00924 "m" is a data member of class "c". Then from within "memfunc", 00925 it is legal to reference "m" directly (e.g. you don't have to 00926 say "this->m". The symbol table indicates 00927 this by emitting a DNTT_TYPE_WITH symbol within the function "memfunc", 00928 pointing to the type symbol for class "c". 00929 00930 In GDB, this symbol record is unnecessary, 00931 because GDB's symbol lookup algorithm 00932 infers the "with" semantics when it sees a "this" argument to the member 00933 function. So GDB can safely ignore the DNTT_TYPE_WITH record. 00934 00935 A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */ 00936 00937 struct dntt_type_with 00938 { 00939 unsigned int extension: 1; /* always zero */ 00940 unsigned int kind: 10; /* always DNTT_TYPE_WITH */ 00941 unsigned int addrtype: 2; /* 0 => STATTYPE */ 00942 /* 1 => DYNTYPE */ 00943 /* 2 => REGTYPE */ 00944 unsigned int indirect: 1; /* 1 => pointer to object */ 00945 unsigned int longaddr: 1; /* 1 => in long pointer space */ 00946 unsigned int nestlevel: 6; /* # of nesting levels back */ 00947 unsigned int doc_ranges: 1; /* 1 => location is range list */ 00948 unsigned int unused: 10; 00949 long location; /* where stored (allocated) */ 00950 sltpointer address; 00951 dnttpointer type; /* type of with expression */ 00952 vtpointer name; /* name of with expression */ 00953 unsigned long offset; /* byte offset from location */ 00954 }; 00955 00956 /* DNTT_TYPE_COMMON is unsupported by GDB. */ 00957 /* A DNTT_TYPE_COMMON symbol must have a matching DNTT_TYPE_END symbol */ 00958 00959 /* DNTT_TYPE_COBSTRUCT is unsupported by GDB. */ 00960 /* DNTT_TYPE_XREF is unsupported by GDB. */ 00961 /* DNTT_TYPE_SA is unsupported by GDB. */ 00962 /* DNTT_TYPE_MACRO is unsupported by GDB */ 00963 00964 /* DNTT_TYPE_BLOCKDATA has the same structure as DNTT_TYPE_FUNCTION */ 00965 00966 /* The following are the C++ specific SOM records */ 00967 00968 /* The purpose of the DNTT_TYPE_CLASS_SCOPE is to bracket C++ methods 00969 and indicate the method name belongs in the "class scope" rather 00970 than in the module they are being defined in. For example: 00971 00972 class c { 00973 ... 00974 void memfunc(); // member function 00975 }; 00976 00977 void c::memfunc() // definition of class c's "memfunc" 00978 { 00979 ... 00980 } 00981 00982 main() 00983 { 00984 ... 00985 } 00986 00987 In the above, the name "memfunc" is not directly visible from "main". 00988 I.e., you have to say "break c::memfunc". 00989 If it were a normal function (not a method), it would be visible 00990 via the simple "break memfunc". Since "memfunc" otherwise looks 00991 like a normal FUNCTION in the symbol table, the bracketing 00992 CLASS_SCOPE is what is used to indicate it is really a method. 00993 00994 00995 A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */ 00996 00997 struct dntt_type_class_scope 00998 { 00999 unsigned int extension: 1; /* Always zero. */ 01000 unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */ 01001 unsigned int unused: 21; 01002 sltpointer address ; /* Pointer to SLT entry. */ 01003 dnttpointer type ; /* Pointer to class type DNTT. */ 01004 }; 01005 01006 /* C++ reference parameter. 01007 The structure of this record is the same as DNTT_TYPE_POINTER - 01008 refer to struct dntt_type_pointer. */ 01009 01010 /* The next two describe C++ pointer-to-data-member type, and 01011 pointer-to-member-function type, respectively. 01012 DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */ 01013 01014 struct dntt_type_ptrmem 01015 { 01016 unsigned int extension: 1; /* Always zero. */ 01017 unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */ 01018 unsigned int unused: 21; 01019 dnttpointer pointsto ; /* Pointer to class DNTT. */ 01020 dnttpointer memtype ; /* Type of member. */ 01021 }; 01022 01023 struct dntt_type_ptrmemfunc 01024 { 01025 unsigned int extension: 1; /* Always zero. */ 01026 unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */ 01027 unsigned int unused: 21; 01028 dnttpointer pointsto ; /* Pointer to class DNTT. */ 01029 dnttpointer memtype ; /* Type of member. */ 01030 }; 01031 01032 /* The DNTT_TYPE_CLASS symbol is emitted to describe a class type. 01033 "memberlist" points to a chained list of FIELD or GENFIELD records 01034 indicating the class members. "parentlist" points to a chained list 01035 of INHERITANCE records indicating classes from which we inherit 01036 fields. */ 01037 01038 struct dntt_type_class 01039 { 01040 unsigned int extension: 1; /* Always zero. */ 01041 unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */ 01042 unsigned int abstract: 1; /* Is this an abstract class? */ 01043 unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */ 01044 unsigned int expansion: 1; /* 1=template expansion. */ 01045 unsigned int unused: 17; 01046 dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */ 01047 unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */ 01048 dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */ 01049 unsigned long bitlength ; /* Total at this level. */ 01050 dnttpointer identlist ; /* Ptr to chain of class ident's. */ 01051 dnttpointer friendlist ; /* Ptr to K_FRIEND list. */ 01052 dnttpointer templateptr ; /* Ptr to template. */ 01053 dnttpointer nextexp ; /* Ptr to next expansion. */ 01054 }; 01055 01056 /* Class members are indicated via either the FIELD record (for 01057 data members, same as for C struct fields), or by the GENFIELD record 01058 (for member functions). */ 01059 01060 struct dntt_type_genfield 01061 { 01062 unsigned int extension: 1; /* Always zero. */ 01063 unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */ 01064 unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */ 01065 unsigned int a_union: 1; /* 1 => anonymous union member. */ 01066 unsigned int unused: 18; 01067 dnttpointer field ; /* Pointer to field or qualifier. */ 01068 dnttpointer nextfield ; /* Pointer to next field. */ 01069 }; 01070 01071 /* C++ virtual functions. */ 01072 01073 struct dntt_type_vfunc 01074 { 01075 unsigned int extension: 1; /* always zero */ 01076 unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */ 01077 unsigned int pure: 1; /* pure virtual function ? */ 01078 unsigned int unused: 20; 01079 dnttpointer funcptr ; /* points to FUNCTION symbol */ 01080 unsigned long vtbl_offset ; /* offset into vtbl for virtual */ 01081 }; 01082 01083 /* Not precisely sure what this is intended for - DDE ignores it. */ 01084 01085 struct dntt_type_memaccess 01086 { 01087 unsigned int extension: 1; /* always zero */ 01088 unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */ 01089 unsigned int unused: 21; 01090 dnttpointer classptr ; /* pointer to base class */ 01091 dnttpointer field ; /* pointer field */ 01092 }; 01093 01094 /* The DNTT_TYPE_INHERITANCE record describes derived classes. 01095 In particular, the "parentlist" field of the CLASS record points 01096 to a list of INHERITANCE records for classes from which we 01097 inherit members. */ 01098 01099 struct dntt_type_inheritance 01100 { 01101 unsigned int extension: 1; /* always zero */ 01102 unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */ 01103 unsigned int Virtual: 1; /* virtual base class ? */ 01104 unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */ 01105 unsigned int unused: 18; 01106 dnttpointer classname ; /* first parent class, if any */ 01107 unsigned long offset ; /* offset to start of base class */ 01108 dnttpointer next ; /* pointer to next K_INHERITANCE */ 01109 unsigned long future[2] ; /* padding to 3-word block end */ 01110 }; 01111 01112 /* C++ "friend" classes ... */ 01113 01114 struct dntt_type_friend_class 01115 { 01116 unsigned int extension: 1; /* always zero */ 01117 unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */ 01118 unsigned int unused: 21; 01119 dnttpointer classptr ; /* pointer to class DNTT */ 01120 dnttpointer next ; /* next DNTT_FRIEND */ 01121 }; 01122 01123 struct dntt_type_friend_func 01124 { 01125 unsigned int extension: 1; /* always zero */ 01126 unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */ 01127 unsigned int unused: 21; 01128 dnttpointer funcptr ; /* pointer to function */ 01129 dnttpointer classptr ; /* pointer to class DNTT */ 01130 dnttpointer next ; /* next DNTT_FRIEND */ 01131 unsigned long future[2] ; /* padding to 3-word block end */ 01132 }; 01133 01134 /* DDE appears to ignore the DNTT_TYPE_MODIFIER record. 01135 It could perhaps be used to give better "ptype" output in GDB; 01136 otherwise it is probably safe for GDB to ignore it also. */ 01137 01138 struct dntt_type_modifier 01139 { 01140 unsigned int extension: 1; /* always zero */ 01141 unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */ 01142 unsigned int m_const: 1; /* const */ 01143 unsigned int m_static: 1; /* static */ 01144 unsigned int m_void: 1; /* void */ 01145 unsigned int m_volatile: 1; /* volatile */ 01146 unsigned int m_duplicate: 1; /* duplicate */ 01147 unsigned int unused: 16; 01148 dnttpointer type ; /* subtype */ 01149 unsigned long future ; /* padding to 3-word block end */ 01150 }; 01151 01152 /* I'm not sure what this was intended for - DDE ignores it. */ 01153 01154 struct dntt_type_object_id 01155 { 01156 unsigned int extension: 1; /* always zero */ 01157 unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */ 01158 unsigned int indirect: 1; /* Is object_ident addr of addr? */ 01159 unsigned int unused: 20; 01160 unsigned long object_ident ; /* object identifier */ 01161 unsigned long offset ; /* offset to start of base class */ 01162 dnttpointer next ; /* pointer to next K_OBJECT_ID */ 01163 unsigned long segoffset ; /* for linker fixup */ 01164 unsigned long future ; /* padding to 3-word block end */ 01165 }; 01166 01167 /* No separate dntt_type_memfunc; same as dntt_type_func */ 01168 01169 /* Symbol records to support templates. These only get used 01170 in DDE's "describe" output (like GDB's "ptype"). */ 01171 01172 /* The TEMPLATE record is the header for a template-class. 01173 Like the CLASS record, a TEMPLATE record has a memberlist that 01174 points to a list of template members. It also has an arglist 01175 pointing to a list of TEMPLATE_ARG records. */ 01176 01177 struct dntt_type_template 01178 { 01179 unsigned int extension: 1; /* always zero */ 01180 unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */ 01181 unsigned int abstract: 1; /* is this an abstract class? */ 01182 unsigned int class_decl: 2; /* 0=class,1=union,2=struct */ 01183 unsigned int unused: 18; 01184 dnttpointer memberlist ; /* ptr to chain of K_[GEN]FIELDs */ 01185 long unused2 ; /* offset in obj of ptr to vtbl */ 01186 dnttpointer parentlist ; /* ptr to K_INHERITANCE list */ 01187 unsigned long bitlength ; /* total at this level */ 01188 dnttpointer identlist ; /* ptr to chain of class ident's */ 01189 dnttpointer friendlist ; /* ptr to K_FRIEND list */ 01190 dnttpointer arglist ; /* ptr to argument list */ 01191 dnttpointer expansions ; /* ptr to expansion list */ 01192 }; 01193 01194 /* Template-class arguments are a list of TEMPL_ARG records 01195 chained together. The "name" field is the name of the formal. 01196 E.g.: 01197 01198 template <class T> class q { ... }; 01199 01200 Then "T" is the name of the formal argument. */ 01201 01202 struct dntt_type_templ_arg 01203 { 01204 unsigned int extension: 1; /* always zero */ 01205 unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */ 01206 unsigned int usagetype: 1; /* 0 type-name 1 expression */ 01207 unsigned int unused: 20; 01208 vtpointer name ; /* name of argument */ 01209 dnttpointer type ; /* for non type arguments */ 01210 dnttpointer nextarg ; /* Next argument if any */ 01211 long future[2] ; /* padding to 3-word block end */ 01212 }; 01213 01214 /* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted 01215 for template member functions. E.g., 01216 01217 template <class T> class q 01218 { 01219 ... 01220 void f(); 01221 ... 01222 }; 01223 01224 Within the list of FIELDs/GENFIELDs defining the member list 01225 of the template "q", "f" would appear as a FUNC_TEMPLATE. 01226 We'll also see instances of FUNCTION "f" records for each 01227 instantiation of the template. */ 01228 01229 struct dntt_type_func_template 01230 { 01231 unsigned int extension: 1; /* always zero */ 01232 unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */ 01233 unsigned int public: 1; /* 1 => globally visible */ 01234 unsigned int language: 4; /* type of language */ 01235 unsigned int level: 5; /* nesting level (top level = 0)*/ 01236 unsigned int optimize: 2; /* level of optimization */ 01237 unsigned int varargs: 1; /* ellipses. Pascal/800 later */ 01238 unsigned int info: 4; /* lang-specific stuff; F_xxxx */ 01239 unsigned int inlined: 1; 01240 unsigned int localloc: 1; /* 0 at top, 1 at end of block */ 01241 unsigned int unused: 2; 01242 vtpointer name ; /* name of function */ 01243 vtpointer alias ; /* alternate name, if any */ 01244 dnttpointer firstparam ; /* first FPARAM, if any */ 01245 dnttpointer retval ; /* return type, if any */ 01246 dnttpointer arglist ; /* ptr to argument list */ 01247 }; 01248 01249 /* LINK is apparently intended to link together function template 01250 definitions with their instantiations. However, it is not clear 01251 why this would be needed, except to provide the information on 01252 a "ptype" command. And as far as I can tell, aCC does not 01253 generate this record. */ 01254 01255 struct dntt_type_link 01256 { 01257 unsigned int extension: 1; /* always zero */ 01258 unsigned int kind: 10; /* always DNTT_TYPE_LINK */ 01259 unsigned int linkKind: 4; /* always LINK_UNKNOWN */ 01260 unsigned int unused: 17; 01261 long future1 ; /* expansion */ 01262 dnttpointer ptr1 ; /* link from template */ 01263 dnttpointer ptr2 ; /* to expansion */ 01264 long future[2] ; /* padding to 3-word block end */ 01265 }; 01266 01267 /* end of C++ specific SOM's. */ 01268 01269 /* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */ 01270 /* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */ 01271 /* DNTT_TYPE_BEGIN_EXT is unused by GDB */ 01272 /* DNTT_TYPE_INLN is unused by GDB */ 01273 /* DNTT_TYPE_INLN_LIST is unused by GDB */ 01274 /* DNTT_TYPE_ALIAS is unused by GDB */ 01275 01276 struct dntt_type_doc_function 01277 { 01278 unsigned int extension: 1; /* always zero */ 01279 unsigned int kind: 10; /* K_DOC_FUNCTION or */ 01280 /* K_DOC_MEMFUNC */ 01281 unsigned int global: 1; /* 1 => globally visible */ 01282 unsigned int language: 4; /* type of language */ 01283 unsigned int level: 5; /* nesting level (top level = 0)*/ 01284 unsigned int optimize: 2; /* level of optimization */ 01285 unsigned int varargs: 1; /* ellipses. Pascal/800 later */ 01286 unsigned int info: 4; /* lang-specific stuff; F_xxxx */ 01287 unsigned int inlined: 1; 01288 unsigned int localloc: 1; /* 0 at top, 1 at end of block */ 01289 unsigned int expansion: 1; /* 1 = function expansion */ 01290 unsigned int doc_clone: 1; 01291 vtpointer name; /* name of function */ 01292 vtpointer alias; /* alternate name, if any */ 01293 dnttpointer firstparam; /* first FPARAM, if any */ 01294 sltpointer address; /* code and text locations */ 01295 CORE_ADDR entryaddr; /* address of entry point */ 01296 dnttpointer retval; /* return type, if any */ 01297 CORE_ADDR lowaddr; /* lowest address of function */ 01298 CORE_ADDR hiaddr; /* highest address of function */ 01299 dnttpointer inline_list; /* pointer to first inline */ 01300 ltpointer lt_offset; /* start of frag/cp line table */ 01301 ctxtpointer ctxt_offset; /* start of context table for this routine */ 01302 }; 01303 01304 /* DNTT_TYPE_DOC_MEMFUNC is unused by GDB */ 01305 01306 /* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures 01307 so we can examine a DNTT entry in a generic fashion. */ 01308 struct dntt_type_generic 01309 { 01310 unsigned int word[9]; 01311 }; 01312 01313 struct dntt_type_block 01314 { 01315 unsigned int extension: 1; 01316 unsigned int kind: 10; 01317 unsigned int unused: 21; 01318 unsigned int word[2]; 01319 }; 01320 01321 /* One entry in a DNTT (either the LNTT or GNTT). 01322 This is a union of the above 60 or so structure definitions. */ 01323 01324 union dnttentry 01325 { 01326 struct dntt_type_srcfile dsfile; 01327 struct dntt_type_module dmodule; 01328 struct dntt_type_function dfunc; 01329 struct dntt_type_function dentry; 01330 struct dntt_type_begin dbegin; 01331 struct dntt_type_end dend; 01332 struct dntt_type_fparam dfparam; 01333 struct dntt_type_svar dsvar; 01334 struct dntt_type_dvar ddvar; 01335 struct dntt_type_const dconst; 01336 struct dntt_type_type dtype; 01337 struct dntt_type_type dtag; 01338 struct dntt_type_pointer dptr; 01339 struct dntt_type_enum denum; 01340 struct dntt_type_memenum dmember; 01341 struct dntt_type_set dset; 01342 struct dntt_type_subrange dsubr; 01343 struct dntt_type_array darray; 01344 struct dntt_type_struct dstruct; 01345 struct dntt_type_union dunion; 01346 struct dntt_type_field dfield; 01347 struct dntt_type_functype dfunctype; 01348 struct dntt_type_with dwith; 01349 struct dntt_type_function dblockdata; 01350 struct dntt_type_class_scope dclass_scope; 01351 struct dntt_type_pointer dreference; 01352 struct dntt_type_ptrmem dptrmem; 01353 struct dntt_type_ptrmemfunc dptrmemfunc; 01354 struct dntt_type_class dclass; 01355 struct dntt_type_genfield dgenfield; 01356 struct dntt_type_vfunc dvfunc; 01357 struct dntt_type_memaccess dmemaccess; 01358 struct dntt_type_inheritance dinheritance; 01359 struct dntt_type_friend_class dfriend_class; 01360 struct dntt_type_friend_func dfriend_func; 01361 struct dntt_type_modifier dmodifier; 01362 struct dntt_type_object_id dobject_id; 01363 struct dntt_type_template dtemplate; 01364 struct dntt_type_templ_arg dtempl_arg; 01365 struct dntt_type_func_template dfunc_template; 01366 struct dntt_type_link dlink; 01367 struct dntt_type_doc_function ddocfunc; 01368 struct dntt_type_generic dgeneric; 01369 struct dntt_type_block dblock; 01370 }; 01371 01372 /* Source line entry types. */ 01373 enum slttype 01374 { 01375 SLT_NORMAL, 01376 SLT_SRCFILE, 01377 SLT_MODULE, 01378 SLT_FUNCTION, 01379 SLT_ENTRY, 01380 SLT_BEGIN, 01381 SLT_END, 01382 SLT_WITH, 01383 SLT_EXIT, 01384 SLT_ASSIST, 01385 SLT_MARKER, 01386 SLT_CLASS_SCOPE, 01387 SLT_INLN, 01388 SLT_NORMAL_OFFSET, 01389 }; 01390 01391 /* A normal source line entry. Simply provides a mapping of a source 01392 line number to a code address. 01393 01394 SLTDESC will always be SLT_NORMAL or SLT_EXIT. */ 01395 01396 struct slt_normal 01397 { 01398 unsigned int sltdesc: 4; 01399 unsigned int line: 28; 01400 CORE_ADDR address; 01401 }; 01402 01403 struct slt_normal_off 01404 { 01405 unsigned int sltdesc: 4; 01406 unsigned int offset: 6; 01407 unsigned int line: 22; 01408 CORE_ADDR address; 01409 }; 01410 01411 /* A special source line entry. Provides a mapping of a declaration 01412 to a line number. These entries point back into the DNTT which 01413 references them. */ 01414 01415 struct slt_special 01416 { 01417 unsigned int sltdesc: 4; 01418 unsigned int line: 28; 01419 dnttpointer backptr; 01420 }; 01421 01422 /* Used to describe nesting. 01423 01424 For nested languages, an slt_assist entry must follow each SLT_FUNC 01425 entry in the SLT. The address field will point forward to the 01426 first slt_normal entry within the function's scope. */ 01427 01428 struct slt_assist 01429 { 01430 unsigned int sltdesc: 4; 01431 unsigned int unused: 28; 01432 sltpointer address; 01433 }; 01434 01435 struct slt_generic 01436 { 01437 unsigned int word[2]; 01438 }; 01439 01440 union sltentry 01441 { 01442 struct slt_normal snorm; 01443 struct slt_normal_off snormoff; 01444 struct slt_special sspec; 01445 struct slt_assist sasst; 01446 struct slt_generic sgeneric; 01447 }; 01448 01449 /* $LINES$ declarations 01450 This is the line table used for optimized code, which is only present 01451 in the new $PROGRAM_INFO$ debug space. */ 01452 01453 #define DST_LN_ESCAPE_FLAG1 15 01454 #define DST_LN_ESCAPE_FLAG2 14 01455 #define DST_LN_CTX_SPEC1 13 01456 #define DST_LN_CTX_SPEC2 12 01457 01458 /* Escape function codes: */ 01459 01460 typedef enum 01461 { 01462 dst_ln_pad, /* pad byte */ 01463 dst_ln_escape_1, /* reserved */ 01464 dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */ 01465 dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */ 01466 dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */ 01467 dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */ 01468 dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */ 01469 dst_ln_ln_off, /* statement escape, stmt # = next byte */ 01470 dst_ln_entry, /* entry escape, next byte is entry number */ 01471 dst_ln_exit, /* exit escape */ 01472 dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */ 01473 dst_ln_stmt_cp, /* current stmt is a critical point */ 01474 dst_ln_escape_12, /* reserved */ 01475 dst_ln_escape_13, /* this is an exception site record */ 01476 dst_ln_nxt_byte, /* next byte contains the real escape code */ 01477 dst_ln_end, /* end escape, final entry follows */ 01478 dst_ln_escape1_END_OF_ENUM 01479 } 01480 dst_ln_escape1_t; 01481 01482 typedef enum 01483 { 01484 dst_ln_ctx_1, /* next byte describes context switch with 5-bit */ 01485 /* index into the image table and 3-bit run length. */ 01486 /* If run length is 0, end with another cxt specifier or ctx_end */ 01487 dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */ 01488 dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */ 01489 dst_ln_ctx_end, /* end current context */ 01490 dst_ln_col_run_1, /* next byte is column position of start of next statement, */ 01491 /* following byte is length of statement */ 01492 dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */ 01493 /* following 2 bytes is length of statement */ 01494 dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */ 01495 dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */ 01496 dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */ 01497 dst_ln_escape2_END_OF_ENUM 01498 } 01499 dst_ln_escape2_t; 01500 01501 typedef union 01502 { 01503 struct 01504 { 01505 unsigned int pc_delta : 4; /* 4 bit pc delta */ 01506 int ln_delta : 4; /* 4 bit line number delta */ 01507 } 01508 delta; 01509 01510 struct 01511 { 01512 unsigned int esc_flag : 4; /* alias for pc_delta */ 01513 unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */ 01514 } 01515 esc; 01516 01517 struct 01518 { 01519 unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */ 01520 unsigned int run_length : 2; 01521 unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */ 01522 } 01523 ctx_spec; 01524 01525 char sdata; /* signed data byte */ 01526 unsigned char udata; /* unsigned data byte */ 01527 } 01528 dst_ln_entry_t, 01529 * dst_ln_entry_ptr_t; 01530 01531 /* Warning: although the above union occupies only 1 byte the compiler treats 01532 it as having size 2 (the minimum size of a struct). Therefore a sequence of 01533 dst_ln_entry_t's cannot be described as an array, and walking through such a 01534 sequence requires convoluted code such as 01535 ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1 01536 We regret the inconvenience. */ 01537 01538 /* Structure for interpreting the byte following a dst_ln_ctx1 entry. */ 01539 typedef struct 01540 { 01541 unsigned int ctx1_index : 5; /* 5 bit index into context table */ 01542 unsigned int ctx1_run_length : 3; /* 3 bit run length */ 01543 } dst_ln_ctx1_t, 01544 *dst_ln_ctx1_ptr_t; 01545 01546 /* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */ 01547 typedef struct 01548 { 01549 unsigned int ctx2_index : 13; /* 13 bit index into context table */ 01550 unsigned int ctx2_run_length : 3; /* 3 bit run length */ 01551 } dst_ln_ctx2_t, 01552 *dst_ln_ctx2_ptr_t; 01553 01554 /* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */ 01555 typedef struct 01556 { 01557 unsigned int ctx4_index : 29; /* 29 bit index into context table */ 01558 unsigned int ctx4_run_length : 3; /* 3 bit run length */ 01559 } dst_ln_ctx4_t, 01560 *dst_ln_ctx4_ptr_t; 01561 01562 01563 /* PXDB definitions. 01564 01565 PXDB is a post-processor which takes the executable file 01566 and massages the debug information so that the debugger may 01567 start up and run more efficiently. Some of the tasks 01568 performed by PXDB are: 01569 01570 o Remove duplicate global type and variable information 01571 from the GNTT, 01572 01573 o Append the GNTT onto the end of the LNTT and place both 01574 back in the LNTT section, 01575 01576 o Build quick look-up tables (description follows) for 01577 files, procedures, modules, and paragraphs (for Cobol), 01578 placing these in the GNTT section, 01579 01580 o Reconstruct the header appearing in the header section 01581 to access this information. 01582 01583 The "quick look-up" tables are in the $GNTT$ sub-space, in 01584 the following order: 01585 01586 Procedures -sorted by address 01587 Source files -sorted by address (of the 01588 generated code from routines) 01589 Modules -sorted by address 01590 Classes -<unsorted?> 01591 Address Alias -sorted by index <?> 01592 Object IDs -sorted by object identifier 01593 01594 Most quick entries have (0-based) indices into the LNTT tables to 01595 the full entries for the item it describes. 01596 01597 The post-PXDB header is in the $HEADER$ sub-space. Alas, it 01598 occurs in different forms, depending on the optimization level 01599 in the compilation step and whether PXDB was run or not. The 01600 worst part is the forms aren't self-describing, so we'll have 01601 to grovel in the bits to figure out what kind we're looking at 01602 (see hp_get_header in hp-psymtab-read.c). */ 01603 01604 /* PXDB versions. */ 01605 01606 #define PXDB_VERSION_CPLUSPLUS 1 01607 #define PXDB_VERSION_7_4 2 01608 #define PXDB_VERSION_CPP_30 3 01609 #define PXDB_VERSION_DDE_3_2A 4 01610 #define PXDB_VERSION_DDE_3_2 5 01611 #define PXDB_VERSION_DDE_4_0 6 01612 01613 #define PXDB_VERSION_2_1 1 01614 01615 /* Header version for the case that there is no DOC info 01616 but the executable has been processed by pxdb (the easy 01617 case, from "cc -g"). */ 01618 01619 typedef struct PXDB_struct 01620 { 01621 int pd_entries; /* # of entries in function look-up table */ 01622 int fd_entries; /* # of entries in file look-up table */ 01623 int md_entries; /* # of entries in module look-up table */ 01624 unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ 01625 unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ 01626 unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ 01627 /* used for version check in xdb */ 01628 unsigned int inlined: 1; /* one or more functions have been inlined */ 01629 unsigned int spare:12; 01630 short version; /* pxdb header version */ 01631 int globals; /* index into the DNTT where GNTT begins */ 01632 unsigned int time; /* modify time of file before being pxdbed */ 01633 int pg_entries; /* # of entries in label look-up table */ 01634 int functions; /* actual number of functions */ 01635 int files; /* actual number of files */ 01636 int cd_entries; /* # of entries in class look-up table */ 01637 int aa_entries; /* # of entries in addr alias look-up table */ 01638 int oi_entries; /* # of entries in object id look-up table */ 01639 } PXDB_header, *PXDB_header_ptr; 01640 01641 /* Header version for the case that there is no DOC info and the 01642 executable has NOT been processed by pxdb. */ 01643 01644 typedef struct XDB_header_struct 01645 { 01646 long gntt_length; 01647 long lntt_length; 01648 long slt_length; 01649 long vt_length; 01650 long xt_length; 01651 } XDB_header; 01652 01653 /* Header version for the case that there is DOC info and the 01654 executable has been processed by pxdb. */ 01655 01656 typedef struct DOC_info_PXDB_header_struct 01657 { 01658 unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ 01659 unsigned int doc_header: 1; /* bit set if this is doc-style header */ 01660 unsigned int version: 8; /* version of pxdb see defines 01661 PXDB_VERSION_* in this file. */ 01662 unsigned int reserved_for_flags: 16;/* for future use; -- must be 01663 set to zero. */ 01664 unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */ 01665 unsigned int has_expr_table: 1; /* space has $EXPR$ */ 01666 unsigned int has_range_table: 1; /* space has $RANGE$ */ 01667 unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */ 01668 unsigned int has_lines_table: 1; /* space contains a $LINES$ 01669 subspace for line tables. */ 01670 unsigned int has_lt_offset_map: 1; /* space contains an lt_offset 01671 subspace for line table mapping. */ 01672 /* The following fields are the same as those in the PXDB_header in $DEBUG$ */ 01673 int pd_entries; /* # of entries in function look-up table */ 01674 int fd_entries; /* # of entries in file look-up table */ 01675 int md_entries; /* # of entries in module look-up table */ 01676 unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ 01677 unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ 01678 unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ 01679 /* used for version check in xdb */ 01680 unsigned int inlined: 1; /* one or more functions have been inlined */ 01681 unsigned int spare : 28; 01682 int globals; /* index into the DNTT where GNTT begins */ 01683 unsigned int time; /* modify time of file before being pxdbed */ 01684 int pg_entries; /* # of entries in label look-up table */ 01685 int functions; /* actual number of functions */ 01686 int files; /* actual number of files */ 01687 int cd_entries; /* # of entries in class look-up table */ 01688 int aa_entries; /* # of entries in addr alias look-up table */ 01689 int oi_entries; /* # of entries in object id look-up table */ 01690 } DOC_info_PXDB_header; 01691 01692 /* Header version for the case that there is DOC info and the 01693 executable has NOT been processed by pxdb. */ 01694 01695 typedef struct DOC_info_header_struct 01696 { 01697 unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ 01698 unsigned int doc_header: 1; /* bit set if this is doc-style header*/ 01699 unsigned int version: 8; /* version of debug/header 01700 format. For 10.0 the value 01701 will be 1. For "Davis" the value is 2. */ 01702 unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */ 01703 unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */ 01704 unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */ 01705 unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */ 01706 unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */ 01707 01708 long gntt_length; /* same as old header */ 01709 long lntt_length; /* same as old header */ 01710 long slt_length; /* same as old header */ 01711 long vt_length; /* same as old header */ 01712 long xt_length; /* same as old header */ 01713 long ctxt_length; /* present only if version >= 2 */ 01714 long range_length; /* present only if version >= 2 */ 01715 long expr_length; /* present only if version >= 2 */ 01716 01717 } DOC_info_header; 01718 01719 typedef union GenericDebugHeader_union 01720 { 01721 PXDB_header no_doc; 01722 DOC_info_PXDB_header doc; 01723 XDB_header no_pxdb_no_doc; 01724 DOC_info_header no_pxdb_doc; 01725 } GenericDebugHeader; 01726 01727 01728 /* Procedure Descriptor: 01729 An element of the procedure quick look-up table. */ 01730 01731 typedef struct quick_procedure 01732 { 01733 long isym; /* 0-based index of first symbol 01734 for procedure in $LNTT$, 01735 i.e. the procedure itself. */ 01736 CORE_ADDR adrStart; /* memory adr of start of proc */ 01737 CORE_ADDR adrEnd; /* memory adr of end of proc */ 01738 char *sbAlias; /* alias name of procedure */ 01739 char *sbProc; /* real name of procedure */ 01740 CORE_ADDR adrBp; /* address of entry breakpoint */ 01741 CORE_ADDR adrExitBp; /* address of exit breakpoint */ 01742 int icd; /* member of this class (index) */ 01743 unsigned int ipd; /* index of template for this */ 01744 /* function (index) */ 01745 unsigned int unused: 5; 01746 unsigned int no_lt_offset: 1;/* no entry in lt_offset table */ 01747 unsigned int fTemplate: 1; /* function template */ 01748 unsigned int fExpansion: 1; /* function expansion */ 01749 unsigned int linked : 1; /* linked with other expansions */ 01750 unsigned int duplicate: 1; /* clone of another procedure */ 01751 unsigned int overloaded:1; /* overloaded function */ 01752 unsigned int member: 1; /* class member function */ 01753 unsigned int constructor:1; /* constructor function */ 01754 unsigned int destructor:1; /* destructor function */ 01755 unsigned int Static: 1; /* static function */ 01756 unsigned int Virtual: 1; /* virtual function */ 01757 unsigned int constant: 1; /* constant function */ 01758 unsigned int pure: 1; /* pure (virtual) function */ 01759 unsigned int language: 4; /* procedure's language */ 01760 unsigned int inlined: 1; /* function has been inlined */ 01761 unsigned int Operator: 1; /* operator function */ 01762 unsigned int stub: 1; /* bodyless function */ 01763 unsigned int optimize: 2; /* optimization level */ 01764 unsigned int level: 5; /* nesting level (top=0) */ 01765 } quick_procedure_entry, *quick_procedure_entry_ptr; 01766 01767 /* Source File Descriptor: 01768 An element of the source file quick look-up table. */ 01769 01770 typedef struct quick_source 01771 { 01772 long isym; /* 0-based index in $LNTT$ of 01773 first symbol for this file. */ 01774 CORE_ADDR adrStart; /* mem adr of start of file's code */ 01775 CORE_ADDR adrEnd; /* mem adr of end of file's code */ 01776 char *sbFile; /* name of source file */ 01777 unsigned int fHasDecl: 1; /* do we have a .d file? */ 01778 unsigned int fWarned: 1; /* have warned about age problems? */ 01779 unsigned int fSrcfile: 1; /* 0 => include 1=> source */ 01780 unsigned short ilnMac; /* lines in file (0 if don't know) */ 01781 int ipd; /* 0-based index of first procedure 01782 in this file, in the quick 01783 look-up table of procedures. */ 01784 unsigned int *rgLn; /* line pointer array, if any */ 01785 } quick_file_entry, *quick_file_entry_ptr; 01786 01787 /* Module Descriptor: 01788 An element of the module quick reference table. */ 01789 01790 typedef struct quick_module 01791 { 01792 long isym; /* 0-based index of first 01793 symbol for module. */ 01794 CORE_ADDR adrStart; /* adr of start of mod. */ 01795 CORE_ADDR adrEnd; /* adr of end of mod. */ 01796 char *sbAlias; /* alias name of module */ 01797 char *sbMod; /* real name of module */ 01798 unsigned int imports: 1; /* module have any imports? */ 01799 unsigned int vars_in_front: 1; /* module globals in front? */ 01800 unsigned int vars_in_gaps: 1; /* module globals in gaps? */ 01801 unsigned int language: 4; /* type of language */ 01802 unsigned int unused : 25; 01803 unsigned int unused2; /* space for future stuff */ 01804 } quick_module_entry, *quick_module_entry_ptr; 01805 01806 /* Auxiliary Procedure Descriptor: 01807 An element of the auxiliary procedure quick look-up table. */ 01808 01809 typedef struct quick_aux_procedure 01810 { 01811 long isym_inln; /* start on inline list for proc */ 01812 long spare; 01813 } quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr; 01814 01815 /* Paragraph Descriptor: 01816 An element of the paragraph quick look-up table. */ 01817 01818 typedef struct quick_paragraph 01819 { 01820 long isym; /* first symbol for label (index) */ 01821 CORE_ADDR adrStart; /* memory adr of start of label */ 01822 CORE_ADDR adrEnd; /* memory adr of end of label */ 01823 char *sbLab; /* name of label */ 01824 unsigned int inst; /* Used in xdb to store inst @ bp */ 01825 unsigned int sect: 1; /* true = section, false = parag. */ 01826 unsigned int unused: 31; /* future use */ 01827 } quick_paragraph_entry, *quick_paragraph_entry_ptr; 01828 01829 /* Class Descriptor: 01830 An element of the class quick look-up table. */ 01831 01832 typedef struct quick_class 01833 { 01834 char *sbClass; /* name of class */ 01835 long isym; /* class symbol (tag) */ 01836 unsigned int type : 2; /* 0=class, 1=union, 2=struct */ 01837 unsigned int fTemplate : 1;/* class template */ 01838 unsigned int expansion : 1;/* template expansion */ 01839 unsigned int unused :28; 01840 sltpointer lowscope; /* beginning of defined scope */ 01841 sltpointer hiscope; /* end of defined scope */ 01842 } quick_class_entry, *quick_class_entry_ptr; 01843 01844 /* Address Alias Entry 01845 An element of the address alias quick look-up table. */ 01846 01847 typedef struct quick_alias 01848 { 01849 CORE_ADDR low; 01850 CORE_ADDR high; 01851 int index; 01852 unsigned int unused : 31; 01853 unsigned int alternate : 1; /* alternate unnamed aliases? */ 01854 } quick_alias_entry, *quick_alias_entry_ptr; 01855 01856 /* Object Identification Entry 01857 An element of the object identification quick look-up table. */ 01858 01859 typedef struct quick_obj_ID 01860 { 01861 CORE_ADDR obj_ident; /* class identifier */ 01862 long isym; /* class symbol */ 01863 long offset; /* offset to object start */ 01864 } quick_obj_ID_entry, *quick_obj_ID_entry_ptr; 01865 01866 #endif /* HP_SYMTAB_INCLUDED */
1.5.6