1130812Smarcel/* Definitions and structures for reading debug symbols from the 2130812Smarcel native HP C compiler. 3130812Smarcel 4130812Smarcel Written by the Center for Software Science at the University of Utah 5130812Smarcel and by Cygnus Support. 6130812Smarcel 7130812Smarcel Copyright 1994, 1995, 1998, 1999, 2003 Free Software Foundation, Inc. 8130812Smarcel 9130812Smarcel This program is free software; you can redistribute it and/or modify 10130812Smarcel it under the terms of the GNU General Public License as published by 11130812Smarcel the Free Software Foundation; either version 2 of the License, or 12130812Smarcel (at your option) any later version. 13130812Smarcel 14130812Smarcel This program is distributed in the hope that it will be useful, 15130812Smarcel but WITHOUT ANY WARRANTY; without even the implied warranty of 16130812Smarcel MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17130812Smarcel GNU General Public License for more details. 18130812Smarcel 19130812Smarcel You should have received a copy of the GNU General Public License 20130812Smarcel along with this program; if not, write to the Free Software 21130812Smarcel Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 22130812Smarcel 23130812Smarcel#ifndef HP_SYMTAB_INCLUDED 24130812Smarcel#define HP_SYMTAB_INCLUDED 25130812Smarcel 26130812Smarcel/* General information: 27130812Smarcel 28130812Smarcel This header file defines and describes only the data structures 29130812Smarcel necessary to read debug symbols produced by the HP C compiler, 30130812Smarcel HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the 31130812Smarcel SOM object file format. 32130812Smarcel (For a full description of the debug format, ftp hpux-symtab.h from 33130812Smarcel jaguar.cs.utah.edu:/dist). 34130812Smarcel 35130812Smarcel Additional notes (Rich Title) 36130812Smarcel This file is a reverse-engineered version of a file called 37130812Smarcel "symtab.h" which exists internal to HP's Computer Languages Organization 38130812Smarcel in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of 39130812Smarcel the file is copyrighted and not distributed, it is necessary for 40130812Smarcel GDB to use the reverse-engineered version that follows. 41130812Smarcel Work was done by Cygnus to reverse-engineer the C subset of symtab.h. 42130812Smarcel The WDB project has extended this to also contain the C++ 43130812Smarcel symbol definitions, the F90 symbol definitions, 44130812Smarcel and the DOC (debugging-optimized-code) symbol definitions. 45130812Smarcel In some cases (the C++ symbol definitions) 46130812Smarcel I have added internal documentation here that 47130812Smarcel goes beyond what is supplied in HP's symtab.h. If we someday 48130812Smarcel unify these files again, the extra comments should be merged back 49130812Smarcel into HP's symtab.h. 50130812Smarcel 51130812Smarcel ------------------------------------------------------------------- 52130812Smarcel 53130812Smarcel Debug symbols are contained entirely within an unloadable space called 54130812Smarcel $DEBUG$. $DEBUG$ contains several subspaces which group related 55130812Smarcel debug symbols. 56130812Smarcel 57130812Smarcel $GNTT$ contains information for global variables, types and contants. 58130812Smarcel 59130812Smarcel $LNTT$ contains information for procedures (including nesting), scoping 60130812Smarcel information, local variables, types, and constants. 61130812Smarcel 62130812Smarcel $SLT$ contains source line information so that code addresses may be 63130812Smarcel mapped to source lines. 64130812Smarcel 65130812Smarcel $VT$ contains various strings and constants for named objects (variables, 66130812Smarcel typedefs, functions, etc). Strings are stored as null-terminated character 67130812Smarcel lists. Constants always begin on word boundaries. The first byte of 68130812Smarcel the VT must be zero (a null string). 69130812Smarcel 70130812Smarcel $XT$ is not currently used by GDB. 71130812Smarcel 72130812Smarcel Many structures within the subspaces point to other structures within 73130812Smarcel the same subspace, or to structures within a different subspace. These 74130812Smarcel pointers are represented as a structure index from the beginning of 75130812Smarcel the appropriate subspace. */ 76130812Smarcel 77130812Smarcel/* Used to describe where a constant is stored. */ 78130812Smarcelenum location_type 79130812Smarcel{ 80130812Smarcel LOCATION_IMMEDIATE, 81130812Smarcel LOCATION_PTR, 82130812Smarcel LOCATION_VT, 83130812Smarcel}; 84130812Smarcel 85130812Smarcel/* Languages supported by this debug format. Within the data structures 86130812Smarcel this type is limited to 4 bits for a maximum of 16 languages. */ 87130812Smarcelenum hp_language 88130812Smarcel{ 89130812Smarcel HP_LANGUAGE_UNKNOWN, 90130812Smarcel HP_LANGUAGE_C, 91130812Smarcel HP_LANGUAGE_FORTRAN, 92130812Smarcel HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN, 93130812Smarcel HP_LANGUAGE_PASCAL, 94130812Smarcel HP_LANGUAGE_MODCAL, 95130812Smarcel HP_LANGUAGE_COBOL, 96130812Smarcel HP_LANGUAGE_BASIC, 97130812Smarcel HP_LANGUAGE_ADA, 98130812Smarcel HP_LANGUAGE_CPLUSPLUS, 99130812Smarcel HP_LANGUAGE_DMPASCAL 100130812Smarcel}; 101130812Smarcel 102130812Smarcel 103130812Smarcel/* Basic data types available in this debug format. Within the data 104130812Smarcel structures this type is limited to 5 bits for a maximum of 32 basic 105130812Smarcel data types. */ 106130812Smarcelenum hp_type 107130812Smarcel{ 108130812Smarcel HP_TYPE_UNDEFINED, /* 0 */ 109130812Smarcel HP_TYPE_BOOLEAN, /* 1 */ 110130812Smarcel HP_TYPE_CHAR, /* 2 */ 111130812Smarcel HP_TYPE_INT, /* 3 */ 112130812Smarcel HP_TYPE_UNSIGNED_INT, /* 4 */ 113130812Smarcel HP_TYPE_REAL, /* 5 */ 114130812Smarcel HP_TYPE_COMPLEX, /* 6 */ 115130812Smarcel HP_TYPE_STRING200, /* 7 */ 116130812Smarcel HP_TYPE_LONGSTRING200, /* 8 */ 117130812Smarcel HP_TYPE_TEXT, /* 9 */ 118130812Smarcel HP_TYPE_FLABEL, /* 10 */ 119130812Smarcel HP_TYPE_FTN_STRING_SPEC, /* 11 */ 120130812Smarcel HP_TYPE_MOD_STRING_SPEC, /* 12 */ 121130812Smarcel HP_TYPE_PACKED_DECIMAL, /* 13 */ 122130812Smarcel HP_TYPE_REAL_3000, /* 14 */ 123130812Smarcel HP_TYPE_MOD_STRING_3000, /* 15 */ 124130812Smarcel HP_TYPE_ANYPOINTER, /* 16 */ 125130812Smarcel HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */ 126130812Smarcel HP_TYPE_LOCAL_ANYPOINTER, /* 18 */ 127130812Smarcel HP_TYPE_COMPLEXS3000, /* 19 */ 128130812Smarcel HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */ 129130812Smarcel HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */ 130130812Smarcel HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */ 131130812Smarcel HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */ 132130812Smarcel HP_TYPE_WIDE_CHAR, /* 24 */ 133130812Smarcel HP_TYPE_LONG, /* 25 */ 134130812Smarcel HP_TYPE_UNSIGNED_LONG, /* 26 */ 135130812Smarcel HP_TYPE_DOUBLE, /* 27 */ 136130812Smarcel HP_TYPE_TEMPLATE_ARG, /* 28 */ 137130812Smarcel HP_TYPE_VOID /* 29 */ 138130812Smarcel}; 139130812Smarcel 140130812Smarcel/* An immediate name and type table entry. 141130812Smarcel 142130812Smarcel extension and immediate will always be one. 143130812Smarcel global will always be zero. 144130812Smarcel hp_type is the basic type this entry describes. 145130812Smarcel bitlength is the length in bits for the basic type. */ 146130812Smarcelstruct dnttp_immediate 147130812Smarcel{ 148130812Smarcel unsigned int extension: 1; 149130812Smarcel unsigned int immediate: 1; 150130812Smarcel unsigned int global: 1; 151130812Smarcel unsigned int type: 5; 152130812Smarcel unsigned int bitlength: 24; 153130812Smarcel}; 154130812Smarcel 155130812Smarcel/* A nonimmediate name and type table entry. 156130812Smarcel 157130812Smarcel extension will always be one. 158130812Smarcel immediate will always be zero. 159130812Smarcel if global is zero, this entry points into the LNTT 160130812Smarcel if global is one, this entry points into the GNTT 161130812Smarcel index is the index within the GNTT or LNTT for this entry. */ 162130812Smarcelstruct dnttp_nonimmediate 163130812Smarcel{ 164130812Smarcel unsigned int extension: 1; 165130812Smarcel unsigned int immediate: 1; 166130812Smarcel unsigned int global: 1; 167130812Smarcel unsigned int index: 29; 168130812Smarcel}; 169130812Smarcel 170130812Smarcel/* A pointer to an entry in the GNTT and LNTT tables. It has two 171130812Smarcel forms depending on the type being described. 172130812Smarcel 173130812Smarcel The immediate form is used for simple entries and is one 174130812Smarcel word. 175130812Smarcel 176130812Smarcel The nonimmediate form is used for complex entries and contains 177130812Smarcel an index into the LNTT or GNTT which describes the entire type. 178130812Smarcel 179130812Smarcel If a dnttpointer is -1, then it is a NIL entry. */ 180130812Smarcel 181130812Smarcel#define DNTTNIL (-1) 182130812Smarceltypedef union dnttpointer 183130812Smarcel{ 184130812Smarcel struct dnttp_immediate dntti; 185130812Smarcel struct dnttp_nonimmediate dnttp; 186130812Smarcel int word; 187130812Smarcel} dnttpointer; 188130812Smarcel 189130812Smarcel/* An index into the source line table. As with dnttpointers, a sltpointer 190130812Smarcel of -1 indicates a NIL entry. */ 191130812Smarcel#define SLTNIL (-1) 192130812Smarceltypedef int sltpointer; 193130812Smarcel 194130812Smarcel/* Index into DOC (= "Debugging Optimized Code") line table. */ 195130812Smarcel#define LTNIL (-1) 196130812Smarceltypedef int ltpointer; 197130812Smarcel 198130812Smarcel/* Index into context table. */ 199130812Smarcel#define CTXTNIL (-1) 200130812Smarceltypedef int ctxtpointer; 201130812Smarcel 202130812Smarcel/* Unsigned byte offset into the VT. */ 203130812Smarceltypedef unsigned int vtpointer; 204130812Smarcel 205130812Smarcel/* A DNTT entry (used within the GNTT and LNTT). 206130812Smarcel 207130812Smarcel DNTT entries are variable sized objects, but are always a multiple 208130812Smarcel of 3 words (we call each group of 3 words a "block"). 209130812Smarcel 210130812Smarcel The first bit in each block is an extension bit. This bit is zero 211130812Smarcel for the first block of a DNTT entry. If the entry requires more 212130812Smarcel than one block, then this bit is set to one in all blocks after 213130812Smarcel the first one. */ 214130812Smarcel 215130812Smarcel/* Each DNTT entry describes a particular debug symbol (beginning of 216130812Smarcel a source file, a function, variables, structures, etc. 217130812Smarcel 218130812Smarcel The type of the DNTT entry is stored in the "kind" field within the 219130812Smarcel DNTT entry itself. */ 220130812Smarcel 221130812Smarcelenum dntt_entry_type 222130812Smarcel{ 223130812Smarcel DNTT_TYPE_NIL = -1, 224130812Smarcel DNTT_TYPE_SRCFILE, 225130812Smarcel DNTT_TYPE_MODULE, 226130812Smarcel DNTT_TYPE_FUNCTION, 227130812Smarcel DNTT_TYPE_ENTRY, 228130812Smarcel DNTT_TYPE_BEGIN, 229130812Smarcel DNTT_TYPE_END, 230130812Smarcel DNTT_TYPE_IMPORT, 231130812Smarcel DNTT_TYPE_LABEL, 232130812Smarcel DNTT_TYPE_FPARAM, 233130812Smarcel DNTT_TYPE_SVAR, 234130812Smarcel DNTT_TYPE_DVAR, 235130812Smarcel DNTT_TYPE_HOLE1, 236130812Smarcel DNTT_TYPE_CONST, 237130812Smarcel DNTT_TYPE_TYPEDEF, 238130812Smarcel DNTT_TYPE_TAGDEF, 239130812Smarcel DNTT_TYPE_POINTER, 240130812Smarcel DNTT_TYPE_ENUM, 241130812Smarcel DNTT_TYPE_MEMENUM, 242130812Smarcel DNTT_TYPE_SET, 243130812Smarcel DNTT_TYPE_SUBRANGE, 244130812Smarcel DNTT_TYPE_ARRAY, 245130812Smarcel DNTT_TYPE_STRUCT, 246130812Smarcel DNTT_TYPE_UNION, 247130812Smarcel DNTT_TYPE_FIELD, 248130812Smarcel DNTT_TYPE_VARIANT, 249130812Smarcel DNTT_TYPE_FILE, 250130812Smarcel DNTT_TYPE_FUNCTYPE, 251130812Smarcel DNTT_TYPE_WITH, 252130812Smarcel DNTT_TYPE_COMMON, 253130812Smarcel DNTT_TYPE_COBSTRUCT, 254130812Smarcel DNTT_TYPE_XREF, 255130812Smarcel DNTT_TYPE_SA, 256130812Smarcel DNTT_TYPE_MACRO, 257130812Smarcel DNTT_TYPE_BLOCKDATA, 258130812Smarcel DNTT_TYPE_CLASS_SCOPE, 259130812Smarcel DNTT_TYPE_REFERENCE, 260130812Smarcel DNTT_TYPE_PTRMEM, 261130812Smarcel DNTT_TYPE_PTRMEMFUNC, 262130812Smarcel DNTT_TYPE_CLASS, 263130812Smarcel DNTT_TYPE_GENFIELD, 264130812Smarcel DNTT_TYPE_VFUNC, 265130812Smarcel DNTT_TYPE_MEMACCESS, 266130812Smarcel DNTT_TYPE_INHERITANCE, 267130812Smarcel DNTT_TYPE_FRIEND_CLASS, 268130812Smarcel DNTT_TYPE_FRIEND_FUNC, 269130812Smarcel DNTT_TYPE_MODIFIER, 270130812Smarcel DNTT_TYPE_OBJECT_ID, 271130812Smarcel DNTT_TYPE_MEMFUNC, 272130812Smarcel DNTT_TYPE_TEMPLATE, 273130812Smarcel DNTT_TYPE_TEMPLATE_ARG, 274130812Smarcel DNTT_TYPE_FUNC_TEMPLATE, 275130812Smarcel DNTT_TYPE_LINK, 276130812Smarcel DNTT_TYPE_DYN_ARRAY_DESC, 277130812Smarcel DNTT_TYPE_DESC_SUBRANGE, 278130812Smarcel DNTT_TYPE_BEGIN_EXT, 279130812Smarcel DNTT_TYPE_INLN, 280130812Smarcel DNTT_TYPE_INLN_LIST, 281130812Smarcel DNTT_TYPE_ALIAS, 282130812Smarcel DNTT_TYPE_DOC_FUNCTION, 283130812Smarcel DNTT_TYPE_DOC_MEMFUNC, 284130812Smarcel DNTT_TYPE_MAX 285130812Smarcel}; 286130812Smarcel 287130812Smarcel/* DNTT_TYPE_SRCFILE: 288130812Smarcel 289130812Smarcel One DNTT_TYPE_SRCFILE symbol is output for the start of each source 290130812Smarcel file and at the begin and end of an included file. A DNTT_TYPE_SRCFILE 291130812Smarcel entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers 292130812Smarcel can determine what file a function was defined in. 293130812Smarcel 294130812Smarcel LANGUAGE describes the source file's language. 295130812Smarcel 296130812Smarcel NAME points to an VT entry providing the source file's name. 297130812Smarcel 298130812Smarcel Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen 299130812Smarcel by the compiler (ie they may be relative or absolute). C include files 300130812Smarcel via <> inclusion must use absolute paths. 301130812Smarcel 302130812Smarcel ADDRESS points to an SLT entry from which line number and code locations 303130812Smarcel may be determined. */ 304130812Smarcel 305130812Smarcelstruct dntt_type_srcfile 306130812Smarcel{ 307130812Smarcel unsigned int extension: 1; 308130812Smarcel unsigned int kind: 10; /* DNTT_TYPE_SRCFILE */ 309130812Smarcel unsigned int language: 4; 310130812Smarcel unsigned int unused: 17; 311130812Smarcel vtpointer name; 312130812Smarcel sltpointer address; 313130812Smarcel}; 314130812Smarcel 315130812Smarcel/* DNTT_TYPE_MODULE: 316130812Smarcel 317130812Smarcel A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal 318130812Smarcel module or C source file. A module indicates a compilation unit 319130812Smarcel for name-scoping purposes; in that regard there should be 320130812Smarcel a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records. 321130812Smarcel 322130812Smarcel Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol. 323130812Smarcel 324130812Smarcel NAME points to a VT entry providing the module's name. Note C 325130812Smarcel source files are considered nameless modules. 326130812Smarcel 327130812Smarcel ALIAS point to a VT entry providing a secondary name. 328130812Smarcel 329130812Smarcel ADDRESS points to an SLT entry from which line number and code locations 330130812Smarcel may be determined. */ 331130812Smarcel 332130812Smarcelstruct dntt_type_module 333130812Smarcel{ 334130812Smarcel unsigned int extension: 1; 335130812Smarcel unsigned int kind: 10; /* DNTT_TYPE_MODULE */ 336130812Smarcel unsigned int unused: 21; 337130812Smarcel vtpointer name; 338130812Smarcel vtpointer alias; 339130812Smarcel dnttpointer unused2; 340130812Smarcel sltpointer address; 341130812Smarcel}; 342130812Smarcel 343130812Smarcel/* DNTT_TYPE_FUNCTION, 344130812Smarcel DNTT_TYPE_ENTRY, 345130812Smarcel DNTT_TYPE_BLOCKDATA, 346130812Smarcel DNTT_TYPE_MEMFUNC: 347130812Smarcel 348130812Smarcel A DNTT_TYPE_FUNCTION symbol is emitted for each function definition; 349130812Smarcel a DNTT_TYPE_ENTRY symbols is used for secondary entry points. Both 350130812Smarcel symbols used the dntt_type_function structure. 351130812Smarcel A DNTT_TYPE_BLOCKDATA symbol is emitted ...? 352130812Smarcel A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++). 353130812Smarcel 354130812Smarcel Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END. 355130812Smarcel 356130812Smarcel GLOBAL is nonzero if the function has global scope. 357130812Smarcel 358130812Smarcel LANGUAGE describes the function's source language. 359130812Smarcel 360130812Smarcel OPT_LEVEL describes the optimization level the function was compiled 361130812Smarcel with. 362130812Smarcel 363130812Smarcel VARARGS is nonzero if the function uses varargs. 364130812Smarcel 365130812Smarcel NAME points to a VT entry providing the function's name. 366130812Smarcel 367130812Smarcel ALIAS points to a VT entry providing a secondary name for the function. 368130812Smarcel 369130812Smarcel FIRSTPARAM points to a LNTT entry which describes the parameter list. 370130812Smarcel 371130812Smarcel ADDRESS points to an SLT entry from which line number and code locations 372130812Smarcel may be determined. 373130812Smarcel 374130812Smarcel ENTRYADDR is the memory address corresponding the function's entry point 375130812Smarcel 376130812Smarcel RETVAL points to a LNTT entry describing the function's return value. 377130812Smarcel 378130812Smarcel LOWADDR is the lowest memory address associated with this function. 379130812Smarcel 380130812Smarcel HIADDR is the highest memory address associated with this function. */ 381130812Smarcel 382130812Smarcelstruct dntt_type_function 383130812Smarcel{ 384130812Smarcel unsigned int extension: 1; 385130812Smarcel unsigned int kind: 10; /* DNTT_TYPE_FUNCTION, 386130812Smarcel DNTT_TYPE_ENTRY, 387130812Smarcel DNTT_TYPE_BLOCKDATA 388130812Smarcel or DNTT_TYPE_MEMFUNC */ 389130812Smarcel unsigned int global: 1; 390130812Smarcel unsigned int language: 4; 391130812Smarcel unsigned int nest_level: 5; 392130812Smarcel unsigned int opt_level: 2; 393130812Smarcel unsigned int varargs: 1; 394130812Smarcel unsigned int lang_info: 4; 395130812Smarcel unsigned int inlined: 1; 396130812Smarcel unsigned int localalloc: 1; 397130812Smarcel unsigned int expansion: 1; 398130812Smarcel unsigned int unused: 1; 399130812Smarcel vtpointer name; 400130812Smarcel vtpointer alias; 401130812Smarcel dnttpointer firstparam; 402130812Smarcel sltpointer address; 403130812Smarcel CORE_ADDR entryaddr; 404130812Smarcel dnttpointer retval; 405130812Smarcel CORE_ADDR lowaddr; 406130812Smarcel CORE_ADDR hiaddr; 407130812Smarcel}; 408130812Smarcel 409130812Smarcel/* DNTT_TYPE_BEGIN: 410130812Smarcel 411130812Smarcel A DNTT_TYPE_BEGIN symbol is emitted to begin a new nested scope. 412130812Smarcel Every DNTT_TYPE_BEGIN symbol must have a matching DNTT_TYPE_END symbol. 413130812Smarcel 414130812Smarcel CLASSFLAG is nonzero if this is the beginning of a c++ class definition. 415130812Smarcel 416130812Smarcel ADDRESS points to an SLT entry from which line number and code locations 417130812Smarcel may be determined. */ 418130812Smarcel 419130812Smarcelstruct dntt_type_begin 420130812Smarcel{ 421130812Smarcel unsigned int extension: 1; 422130812Smarcel unsigned int kind: 10; 423130812Smarcel unsigned int classflag: 1; 424130812Smarcel unsigned int unused: 20; 425130812Smarcel sltpointer address; 426130812Smarcel}; 427130812Smarcel 428130812Smarcel/* DNTT_TYPE_END: 429130812Smarcel 430130812Smarcel A DNTT_TYPE_END symbol is emitted when closing a scope started by 431130812Smarcel a DNTT_TYPE_MODULE, DNTT_TYPE_FUNCTION, DNTT_TYPE_WITH, 432130812Smarcel DNTT_TYPE_COMMON, DNTT_TYPE_BEGIN, and DNTT_TYPE_CLASS_SCOPE symbols. 433130812Smarcel 434130812Smarcel ENDKIND describes what type of scope the DNTT_TYPE_END is closing 435130812Smarcel (one of the above 6 kinds). 436130812Smarcel 437130812Smarcel CLASSFLAG is nonzero if this is the end of a c++ class definition. 438130812Smarcel 439130812Smarcel ADDRESS points to an SLT entry from which line number and code locations 440130812Smarcel may be determined. 441130812Smarcel 442130812Smarcel BEGINSCOPE points to the LNTT entry which opened the scope. */ 443130812Smarcel 444130812Smarcelstruct dntt_type_end 445130812Smarcel{ 446130812Smarcel unsigned int extension: 1; 447130812Smarcel unsigned int kind: 10; 448130812Smarcel unsigned int endkind: 10; 449130812Smarcel unsigned int classflag: 1; 450130812Smarcel unsigned int unused: 10; 451130812Smarcel sltpointer address; 452130812Smarcel dnttpointer beginscope; 453130812Smarcel}; 454130812Smarcel 455130812Smarcel/* DNTT_TYPE_IMPORT is unused by GDB. */ 456130812Smarcel/* DNTT_TYPE_LABEL is unused by GDB. */ 457130812Smarcel 458130812Smarcel/* DNTT_TYPE_FPARAM: 459130812Smarcel 460130812Smarcel A DNTT_TYPE_FPARAM symbol is emitted for a function argument. When 461130812Smarcel chained together the symbols represent an argument list for a function. 462130812Smarcel 463130812Smarcel REGPARAM is nonzero if this parameter was passed in a register. 464130812Smarcel 465130812Smarcel INDIRECT is nonzero if this parameter is a pointer to the parameter 466130812Smarcel (pass by reference or pass by value for large items). 467130812Smarcel 468130812Smarcel LONGADDR is nonzero if the parameter is a 64bit pointer. 469130812Smarcel 470130812Smarcel NAME is a pointer into the VT for the parameter's name. 471130812Smarcel 472130812Smarcel LOCATION describes where the parameter is stored. Depending on the 473130812Smarcel parameter type LOCATION could be a register number, or an offset 474130812Smarcel from the stack pointer. 475130812Smarcel 476130812Smarcel TYPE points to a NTT entry describing the type of this parameter. 477130812Smarcel 478130812Smarcel NEXTPARAM points to the LNTT entry describing the next parameter. */ 479130812Smarcel 480130812Smarcelstruct dntt_type_fparam 481130812Smarcel{ 482130812Smarcel unsigned int extension: 1; 483130812Smarcel unsigned int kind: 10; 484130812Smarcel unsigned int regparam: 1; 485130812Smarcel unsigned int indirect: 1; 486130812Smarcel unsigned int longaddr: 1; 487130812Smarcel unsigned int copyparam: 1; 488130812Smarcel unsigned int dflt: 1; 489130812Smarcel unsigned int doc_ranges: 1; 490130812Smarcel unsigned int misc_kind: 1; 491130812Smarcel unsigned int unused: 14; 492130812Smarcel vtpointer name; 493130812Smarcel CORE_ADDR location; 494130812Smarcel dnttpointer type; 495130812Smarcel dnttpointer nextparam; 496130812Smarcel int misc; 497130812Smarcel}; 498130812Smarcel 499130812Smarcel/* DNTT_TYPE_SVAR: 500130812Smarcel 501130812Smarcel A DNTT_TYPE_SVAR is emitted to describe a variable in static storage. 502130812Smarcel 503130812Smarcel GLOBAL is nonzero if the variable has global scope. 504130812Smarcel 505130812Smarcel INDIRECT is nonzero if the variable is a pointer to an object. 506130812Smarcel 507130812Smarcel LONGADDR is nonzero if the variable is in long pointer space. 508130812Smarcel 509130812Smarcel STATICMEM is nonzero if the variable is a member of a class. 510130812Smarcel 511130812Smarcel A_UNION is nonzero if the variable is an anonymous union member. 512130812Smarcel 513130812Smarcel NAME is a pointer into the VT for the variable's name. 514130812Smarcel 515130812Smarcel LOCATION provides the memory address for the variable. 516130812Smarcel 517130812Smarcel TYPE is a pointer into either the GNTT or LNTT which describes 518130812Smarcel the type of this variable. */ 519130812Smarcel 520130812Smarcelstruct dntt_type_svar 521130812Smarcel{ 522130812Smarcel unsigned int extension: 1; 523130812Smarcel unsigned int kind: 10; 524130812Smarcel unsigned int global: 1; 525130812Smarcel unsigned int indirect: 1; 526130812Smarcel unsigned int longaddr: 1; 527130812Smarcel unsigned int staticmem: 1; 528130812Smarcel unsigned int a_union: 1; 529130812Smarcel unsigned int unused1: 1; 530130812Smarcel unsigned int thread_specific: 1; 531130812Smarcel unsigned int unused2: 14; 532130812Smarcel vtpointer name; 533130812Smarcel CORE_ADDR location; 534130812Smarcel dnttpointer type; 535130812Smarcel unsigned int offset; 536130812Smarcel unsigned int displacement; 537130812Smarcel}; 538130812Smarcel 539130812Smarcel/* DNTT_TYPE_DVAR: 540130812Smarcel 541130812Smarcel A DNTT_TYPE_DVAR is emitted to describe automatic variables and variables 542130812Smarcel held in registers. 543130812Smarcel 544130812Smarcel GLOBAL is nonzero if the variable has global scope. 545130812Smarcel 546130812Smarcel INDIRECT is nonzero if the variable is a pointer to an object. 547130812Smarcel 548130812Smarcel REGVAR is nonzero if the variable is in a register. 549130812Smarcel 550130812Smarcel A_UNION is nonzero if the variable is an anonymous union member. 551130812Smarcel 552130812Smarcel NAME is a pointer into the VT for the variable's name. 553130812Smarcel 554130812Smarcel LOCATION provides the memory address or register number for the variable. 555130812Smarcel 556130812Smarcel TYPE is a pointer into either the GNTT or LNTT which describes 557130812Smarcel the type of this variable. */ 558130812Smarcel 559130812Smarcelstruct dntt_type_dvar 560130812Smarcel{ 561130812Smarcel unsigned int extension: 1; 562130812Smarcel unsigned int kind: 10; 563130812Smarcel unsigned int global: 1; 564130812Smarcel unsigned int indirect: 1; 565130812Smarcel unsigned int regvar: 1; 566130812Smarcel unsigned int a_union: 1; 567130812Smarcel unsigned int unused: 17; 568130812Smarcel vtpointer name; 569130812Smarcel int location; 570130812Smarcel dnttpointer type; 571130812Smarcel unsigned int offset; 572130812Smarcel}; 573130812Smarcel 574130812Smarcel/* DNTT_TYPE_CONST: 575130812Smarcel 576130812Smarcel A DNTT_TYPE_CONST symbol is emitted for program constants. 577130812Smarcel 578130812Smarcel GLOBAL is nonzero if the constant has global scope. 579130812Smarcel 580130812Smarcel INDIRECT is nonzero if the constant is a pointer to an object. 581130812Smarcel 582130812Smarcel LOCATION_TYPE describes where to find the constant's value 583130812Smarcel (in the VT, memory, or embedded in an instruction). 584130812Smarcel 585130812Smarcel CLASSMEM is nonzero if the constant is a member of a class. 586130812Smarcel 587130812Smarcel NAME is a pointer into the VT for the constant's name. 588130812Smarcel 589130812Smarcel LOCATION provides the memory address, register number or pointer 590130812Smarcel into the VT for the constant's value. 591130812Smarcel 592130812Smarcel TYPE is a pointer into either the GNTT or LNTT which describes 593130812Smarcel the type of this variable. */ 594130812Smarcel 595130812Smarcelstruct dntt_type_const 596130812Smarcel{ 597130812Smarcel unsigned int extension: 1; 598130812Smarcel unsigned int kind: 10; 599130812Smarcel unsigned int global: 1; 600130812Smarcel unsigned int indirect: 1; 601130812Smarcel unsigned int location_type: 3; 602130812Smarcel unsigned int classmem: 1; 603130812Smarcel unsigned int unused: 15; 604130812Smarcel vtpointer name; 605130812Smarcel CORE_ADDR location; 606130812Smarcel dnttpointer type; 607130812Smarcel unsigned int offset; 608130812Smarcel unsigned int displacement; 609130812Smarcel}; 610130812Smarcel 611130812Smarcel/* DNTT_TYPE_TYPEDEF and DNTT_TYPE_TAGDEF: 612130812Smarcel 613130812Smarcel The same structure is used to describe typedefs and tagdefs. 614130812Smarcel 615130812Smarcel DNTT_TYPE_TYPEDEFS are associated with C "typedefs". 616130812Smarcel 617130812Smarcel DNTT_TYPE_TAGDEFs are associated with C "struct", "union", and "enum" 618130812Smarcel tags, which may have the same name as a typedef in the same scope. 619130812Smarcel Also they are associated with C++ "class" tags, which implicitly have 620130812Smarcel the same name as the class type. 621130812Smarcel 622130812Smarcel GLOBAL is nonzero if the typedef/tagdef has global scope. 623130812Smarcel 624130812Smarcel TYPEINFO is used to determine if full type information is available 625130812Smarcel for a tag. (usually 1, but can be zero for opaque types in C). 626130812Smarcel 627130812Smarcel NAME is a pointer into the VT for the constant's name. 628130812Smarcel 629130812Smarcel TYPE points to the underlying type for the typedef/tagdef in the 630130812Smarcel GNTT or LNTT. */ 631130812Smarcel 632130812Smarcelstruct dntt_type_type 633130812Smarcel{ 634130812Smarcel unsigned int extension: 1; 635130812Smarcel unsigned int kind: 10; /* DNTT_TYPE_TYPEDEF or 636130812Smarcel DNTT_TYPE_TAGDEF. */ 637130812Smarcel unsigned int global: 1; 638130812Smarcel unsigned int typeinfo: 1; 639130812Smarcel unsigned int unused: 19; 640130812Smarcel vtpointer name; 641130812Smarcel dnttpointer type; /* Underlying type, which for TAGDEF's may be 642130812Smarcel DNTT_TYPE_STRUCT, DNTT_TYPE_UNION, 643130812Smarcel DNTT_TYPE_ENUM, or DNTT_TYPE_CLASS. 644130812Smarcel For TYPEDEF's other underlying types 645130812Smarcel are also possible. */ 646130812Smarcel}; 647130812Smarcel 648130812Smarcel/* DNTT_TYPE_POINTER: 649130812Smarcel 650130812Smarcel Used to describe a pointer to an underlying type. 651130812Smarcel 652130812Smarcel POINTSTO is a pointer into the GNTT or LNTT for the type which this 653130812Smarcel pointer points to. 654130812Smarcel 655130812Smarcel BITLENGTH is the length of the pointer (not the underlying type). */ 656130812Smarcel 657130812Smarcelstruct dntt_type_pointer 658130812Smarcel{ 659130812Smarcel unsigned int extension: 1; 660130812Smarcel unsigned int kind: 10; 661130812Smarcel unsigned int unused: 21; 662130812Smarcel dnttpointer pointsto; 663130812Smarcel unsigned int bitlength; 664130812Smarcel}; 665130812Smarcel 666130812Smarcel 667130812Smarcel/* DNTT_TYPE_ENUM: 668130812Smarcel 669130812Smarcel Used to describe enumerated types. 670130812Smarcel 671130812Smarcel FIRSTMEM is a pointer to a DNTT_TYPE_MEMENUM in the GNTT/LNTT which 672130812Smarcel describes the first member (and contains a pointer to the chain of 673130812Smarcel members). 674130812Smarcel 675130812Smarcel BITLENGTH is the number of bits used to hold the values of the enum's 676130812Smarcel members. */ 677130812Smarcel 678130812Smarcelstruct dntt_type_enum 679130812Smarcel{ 680130812Smarcel unsigned int extension: 1; 681130812Smarcel unsigned int kind: 10; 682130812Smarcel unsigned int unused: 21; 683130812Smarcel dnttpointer firstmem; 684130812Smarcel unsigned int bitlength; 685130812Smarcel}; 686130812Smarcel 687130812Smarcel/* DNTT_TYPE_MEMENUM 688130812Smarcel 689130812Smarcel Used to describe members of an enumerated type. 690130812Smarcel 691130812Smarcel CLASSMEM is nonzero if this member is part of a class. 692130812Smarcel 693130812Smarcel NAME points into the VT for the name of this member. 694130812Smarcel 695130812Smarcel VALUE is the value of this enumeration member. 696130812Smarcel 697130812Smarcel NEXTMEM points to the next DNTT_TYPE_MEMENUM in the chain. */ 698130812Smarcel 699130812Smarcelstruct dntt_type_memenum 700130812Smarcel{ 701130812Smarcel unsigned int extension: 1; 702130812Smarcel unsigned int kind: 10; 703130812Smarcel unsigned int classmem: 1; 704130812Smarcel unsigned int unused: 20; 705130812Smarcel vtpointer name; 706130812Smarcel unsigned int value; 707130812Smarcel dnttpointer nextmem; 708130812Smarcel}; 709130812Smarcel 710130812Smarcel/* DNTT_TYPE_SET 711130812Smarcel 712130812Smarcel Used to describe PASCAL "set" type. 713130812Smarcel 714130812Smarcel DECLARATION describes the bitpacking of the set. 715130812Smarcel 716130812Smarcel SUBTYPE points to a DNTT entry describing the type of the members. 717130812Smarcel 718130812Smarcel BITLENGTH is the size of the set. */ 719130812Smarcel 720130812Smarcelstruct dntt_type_set 721130812Smarcel{ 722130812Smarcel unsigned int extension: 1; 723130812Smarcel unsigned int kind: 10; 724130812Smarcel unsigned int declaration: 2; 725130812Smarcel unsigned int unused: 19; 726130812Smarcel dnttpointer subtype; 727130812Smarcel unsigned int bitlength; 728130812Smarcel}; 729130812Smarcel 730130812Smarcel/* DNTT_TYPE_SUBRANGE 731130812Smarcel 732130812Smarcel Used to describe subrange type. 733130812Smarcel 734130812Smarcel DYN_LOW describes the lower bound of the subrange: 735130812Smarcel 736130812Smarcel 00 for a constant lower bound (found in LOWBOUND). 737130812Smarcel 738130812Smarcel 01 for a dynamic lower bound with the lower bound found in the 739130812Smarcel memory address pointed to by LOWBOUND. 740130812Smarcel 741130812Smarcel 10 for a dynamic lower bound described by an variable found in the 742130812Smarcel DNTT/LNTT (LOWBOUND would be a pointer into the DNTT/LNTT). 743130812Smarcel 744130812Smarcel DYN_HIGH is similar to DYN_LOW, except it describes the upper bound. 745130812Smarcel 746130812Smarcel SUBTYPE points to the type of the subrange. 747130812Smarcel 748130812Smarcel BITLENGTH is the length in bits needed to describe the subrange's 749130812Smarcel values. */ 750130812Smarcel 751130812Smarcelstruct dntt_type_subrange 752130812Smarcel{ 753130812Smarcel unsigned int extension: 1; 754130812Smarcel unsigned int kind: 10; 755130812Smarcel unsigned int dyn_low: 2; 756130812Smarcel unsigned int dyn_high: 2; 757130812Smarcel unsigned int unused: 17; 758130812Smarcel int lowbound; 759130812Smarcel int highbound; 760130812Smarcel dnttpointer subtype; 761130812Smarcel unsigned int bitlength; 762130812Smarcel}; 763130812Smarcel 764130812Smarcel/* DNTT_TYPE_ARRAY 765130812Smarcel 766130812Smarcel Used to describe an array type. 767130812Smarcel 768130812Smarcel DECLARATION describes the bit packing used in the array. 769130812Smarcel 770130812Smarcel ARRAYISBYTES is nonzero if the field in arraylength describes the 771130812Smarcel length in bytes rather than in bits. A value of zero is used to 772130812Smarcel describe an array with size 2**32. 773130812Smarcel 774130812Smarcel ELEMISBYTES is nonzero if the length if each element in the array 775130812Smarcel is describes in bytes rather than bits. A value of zero is used 776130812Smarcel to an element with size 2**32. 777130812Smarcel 778130812Smarcel ELEMORDER is nonzero if the elements are indexed in increasing order. 779130812Smarcel 780130812Smarcel JUSTIFIED if the elements are left justified to index zero. 781130812Smarcel 782130812Smarcel ARRAYLENGTH is the length of the array. 783130812Smarcel 784130812Smarcel INDEXTYPE is a DNTT pointer to the type used to index the array. 785130812Smarcel 786130812Smarcel ELEMTYPE is a DNTT pointer to the type for the array elements. 787130812Smarcel 788130812Smarcel ELEMLENGTH is the length of each element in the array (including 789130812Smarcel any padding). 790130812Smarcel 791130812Smarcel Multi-dimensional arrays are represented by ELEMTYPE pointing to 792130812Smarcel another DNTT_TYPE_ARRAY. */ 793130812Smarcel 794130812Smarcelstruct dntt_type_array 795130812Smarcel{ 796130812Smarcel unsigned int extension: 1; 797130812Smarcel unsigned int kind: 10; 798130812Smarcel unsigned int declaration: 2; 799130812Smarcel unsigned int dyn_low: 2; 800130812Smarcel unsigned int dyn_high: 2; 801130812Smarcel unsigned int arrayisbytes: 1; 802130812Smarcel unsigned int elemisbytes: 1; 803130812Smarcel unsigned int elemorder: 1; 804130812Smarcel unsigned int justified: 1; 805130812Smarcel unsigned int unused: 11; 806130812Smarcel unsigned int arraylength; 807130812Smarcel dnttpointer indextype; 808130812Smarcel dnttpointer elemtype; 809130812Smarcel unsigned int elemlength; 810130812Smarcel}; 811130812Smarcel 812130812Smarcel/* DNTT_TYPE_STRUCT 813130812Smarcel 814130812Smarcel DNTT_TYPE_STRUCT is used to describe a C structure. 815130812Smarcel 816130812Smarcel DECLARATION describes the bitpacking used. 817130812Smarcel 818130812Smarcel FIRSTFIELD is a DNTT pointer to the first field of the structure 819130812Smarcel (each field contains a pointer to the next field, walk the list 820130812Smarcel to access all fields of the structure). 821130812Smarcel 822130812Smarcel VARTAGFIELD and VARLIST are used for Pascal variant records. 823130812Smarcel 824130812Smarcel BITLENGTH is the size of the structure in bits. */ 825130812Smarcel 826130812Smarcelstruct dntt_type_struct 827130812Smarcel{ 828130812Smarcel unsigned int extension: 1; 829130812Smarcel unsigned int kind: 10; 830130812Smarcel unsigned int declaration: 2; 831130812Smarcel unsigned int unused: 19; 832130812Smarcel dnttpointer firstfield; 833130812Smarcel dnttpointer vartagfield; 834130812Smarcel dnttpointer varlist; 835130812Smarcel unsigned int bitlength; 836130812Smarcel}; 837130812Smarcel 838130812Smarcel/* DNTT_TYPE_UNION 839130812Smarcel 840130812Smarcel DNTT_TYPE_UNION is used to describe a C union. 841130812Smarcel 842130812Smarcel FIRSTFIELD is a DNTT pointer to the beginning of the field chain. 843130812Smarcel 844130812Smarcel BITLENGTH is the size of the union in bits. */ 845130812Smarcel 846130812Smarcelstruct dntt_type_union 847130812Smarcel{ 848130812Smarcel unsigned int extension: 1; 849130812Smarcel unsigned int kind: 10; 850130812Smarcel unsigned int unused: 21; 851130812Smarcel dnttpointer firstfield; 852130812Smarcel unsigned int bitlength; 853130812Smarcel}; 854130812Smarcel 855130812Smarcel/* DNTT_TYPE_FIELD 856130812Smarcel 857130812Smarcel DNTT_TYPE_FIELD describes one field in a structure or union 858130812Smarcel or C++ class. 859130812Smarcel 860130812Smarcel VISIBILITY is used to describe the visibility of the field 861130812Smarcel (for c++. public = 0, protected = 1, private = 2). 862130812Smarcel 863130812Smarcel A_UNION is nonzero if this field is a member of an anonymous union. 864130812Smarcel 865130812Smarcel STATICMEM is nonzero if this field is a static member of a template. 866130812Smarcel 867130812Smarcel NAME is a pointer into the VT for the name of the field. 868130812Smarcel 869130812Smarcel BITOFFSET gives the offset of this field in bits from the beginning 870130812Smarcel of the structure or union this field is a member of. 871130812Smarcel 872130812Smarcel TYPE is a DNTT pointer to the type describing this field. 873130812Smarcel 874130812Smarcel BITLENGTH is the size of the entry in bits. 875130812Smarcel 876130812Smarcel NEXTFIELD is a DNTT pointer to the next field in the chain. */ 877130812Smarcel 878130812Smarcelstruct dntt_type_field 879130812Smarcel{ 880130812Smarcel unsigned int extension: 1; 881130812Smarcel unsigned int kind: 10; 882130812Smarcel unsigned int visibility: 2; 883130812Smarcel unsigned int a_union: 1; 884130812Smarcel unsigned int staticmem: 1; 885130812Smarcel unsigned int unused: 17; 886130812Smarcel vtpointer name; 887130812Smarcel unsigned int bitoffset; 888130812Smarcel dnttpointer type; 889130812Smarcel unsigned int bitlength; 890130812Smarcel dnttpointer nextfield; 891130812Smarcel}; 892130812Smarcel 893130812Smarcel/* DNTT_TYPE_VARIANT is unused by GDB. */ 894130812Smarcel/* DNTT_TYPE_FILE is unused by GDB. */ 895130812Smarcel 896130812Smarcel/* DNTT_TYPE_FUNCTYPE 897130812Smarcel 898130812Smarcel I think this is used to describe a function type (e.g., would 899130812Smarcel be emitted as part of a function-pointer description). 900130812Smarcel 901130812Smarcel VARARGS is nonzero if this function uses varargs. 902130812Smarcel 903130812Smarcel FIRSTPARAM is a DNTT pointer to the first entry in the parameter 904130812Smarcel chain. 905130812Smarcel 906130812Smarcel RETVAL is a DNTT pointer to the type of the return value. */ 907130812Smarcel 908130812Smarcelstruct dntt_type_functype 909130812Smarcel{ 910130812Smarcel unsigned int extension: 1; 911130812Smarcel unsigned int kind: 10; 912130812Smarcel unsigned int varargs: 1; 913130812Smarcel unsigned int info: 4; 914130812Smarcel unsigned int unused: 16; 915130812Smarcel unsigned int bitlength; 916130812Smarcel dnttpointer firstparam; 917130812Smarcel dnttpointer retval; 918130812Smarcel}; 919130812Smarcel 920130812Smarcel/* DNTT_TYPE_WITH is emitted by C++ to indicate "with" scoping semantics. 921130812Smarcel (Probably also emitted by PASCAL to support "with"...). 922130812Smarcel 923130812Smarcel C++ example: Say "memfunc" is a method of class "c", and say 924130812Smarcel "m" is a data member of class "c". Then from within "memfunc", 925130812Smarcel it is legal to reference "m" directly (e.g. you don't have to 926130812Smarcel say "this->m". The symbol table indicates 927130812Smarcel this by emitting a DNTT_TYPE_WITH symbol within the function "memfunc", 928130812Smarcel pointing to the type symbol for class "c". 929130812Smarcel 930130812Smarcel In GDB, this symbol record is unnecessary, 931130812Smarcel because GDB's symbol lookup algorithm 932130812Smarcel infers the "with" semantics when it sees a "this" argument to the member 933130812Smarcel function. So GDB can safely ignore the DNTT_TYPE_WITH record. 934130812Smarcel 935130812Smarcel A DNTT_TYPE_WITH has a matching DNTT_TYPE_END symbol. */ 936130812Smarcel 937130812Smarcelstruct dntt_type_with 938130812Smarcel{ 939130812Smarcel unsigned int extension: 1; /* always zero */ 940130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_WITH */ 941130812Smarcel unsigned int addrtype: 2; /* 0 => STATTYPE */ 942130812Smarcel /* 1 => DYNTYPE */ 943130812Smarcel /* 2 => REGTYPE */ 944130812Smarcel unsigned int indirect: 1; /* 1 => pointer to object */ 945130812Smarcel unsigned int longaddr: 1; /* 1 => in long pointer space */ 946130812Smarcel unsigned int nestlevel: 6; /* # of nesting levels back */ 947130812Smarcel unsigned int doc_ranges: 1; /* 1 => location is range list */ 948130812Smarcel unsigned int unused: 10; 949130812Smarcel long location; /* where stored (allocated) */ 950130812Smarcel sltpointer address; 951130812Smarcel dnttpointer type; /* type of with expression */ 952130812Smarcel vtpointer name; /* name of with expression */ 953130812Smarcel unsigned long offset; /* byte offset from location */ 954130812Smarcel}; 955130812Smarcel 956130812Smarcel/* DNTT_TYPE_COMMON is unsupported by GDB. */ 957130812Smarcel/* A DNTT_TYPE_COMMON symbol must have a matching DNTT_TYPE_END symbol */ 958130812Smarcel 959130812Smarcel/* DNTT_TYPE_COBSTRUCT is unsupported by GDB. */ 960130812Smarcel/* DNTT_TYPE_XREF is unsupported by GDB. */ 961130812Smarcel/* DNTT_TYPE_SA is unsupported by GDB. */ 962130812Smarcel/* DNTT_TYPE_MACRO is unsupported by GDB */ 963130812Smarcel 964130812Smarcel/* DNTT_TYPE_BLOCKDATA has the same structure as DNTT_TYPE_FUNCTION */ 965130812Smarcel 966130812Smarcel/* The following are the C++ specific SOM records */ 967130812Smarcel 968130812Smarcel/* The purpose of the DNTT_TYPE_CLASS_SCOPE is to bracket C++ methods 969130812Smarcel and indicate the method name belongs in the "class scope" rather 970130812Smarcel than in the module they are being defined in. For example: 971130812Smarcel 972130812Smarcel class c { 973130812Smarcel ... 974130812Smarcel void memfunc(); // member function 975130812Smarcel }; 976130812Smarcel 977130812Smarcel void c::memfunc() // definition of class c's "memfunc" 978130812Smarcel { 979130812Smarcel ... 980130812Smarcel } 981130812Smarcel 982130812Smarcel main() 983130812Smarcel { 984130812Smarcel ... 985130812Smarcel } 986130812Smarcel 987130812Smarcel In the above, the name "memfunc" is not directly visible from "main". 988130812Smarcel I.e., you have to say "break c::memfunc". 989130812Smarcel If it were a normal function (not a method), it would be visible 990130812Smarcel via the simple "break memfunc". Since "memfunc" otherwise looks 991130812Smarcel like a normal FUNCTION in the symbol table, the bracketing 992130812Smarcel CLASS_SCOPE is what is used to indicate it is really a method. 993130812Smarcel 994130812Smarcel 995130812Smarcel A DNTT_TYPE_CLASS_SCOPE symbol must have a matching DNTT_TYPE_END symbol. */ 996130812Smarcel 997130812Smarcelstruct dntt_type_class_scope 998130812Smarcel{ 999130812Smarcel unsigned int extension: 1; /* Always zero. */ 1000130812Smarcel unsigned int kind: 10; /* Always DNTT_TYPE_CLASS_SCOPE. */ 1001130812Smarcel unsigned int unused: 21; 1002130812Smarcel sltpointer address ; /* Pointer to SLT entry. */ 1003130812Smarcel dnttpointer type ; /* Pointer to class type DNTT. */ 1004130812Smarcel}; 1005130812Smarcel 1006130812Smarcel/* C++ reference parameter. 1007130812Smarcel The structure of this record is the same as DNTT_TYPE_POINTER - 1008130812Smarcel refer to struct dntt_type_pointer. */ 1009130812Smarcel 1010130812Smarcel/* The next two describe C++ pointer-to-data-member type, and 1011130812Smarcel pointer-to-member-function type, respectively. 1012130812Smarcel DNTT_TYPE_PTRMEM and DNTT_TYPE_PTRMEMFUNC have the same structure. */ 1013130812Smarcel 1014130812Smarcelstruct dntt_type_ptrmem 1015130812Smarcel{ 1016130812Smarcel unsigned int extension: 1; /* Always zero. */ 1017130812Smarcel unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEM. */ 1018130812Smarcel unsigned int unused: 21; 1019130812Smarcel dnttpointer pointsto ; /* Pointer to class DNTT. */ 1020130812Smarcel dnttpointer memtype ; /* Type of member. */ 1021130812Smarcel}; 1022130812Smarcel 1023130812Smarcelstruct dntt_type_ptrmemfunc 1024130812Smarcel{ 1025130812Smarcel unsigned int extension: 1; /* Always zero. */ 1026130812Smarcel unsigned int kind: 10; /* Always DNTT_TYPE_PTRMEMFUNC. */ 1027130812Smarcel unsigned int unused: 21; 1028130812Smarcel dnttpointer pointsto ; /* Pointer to class DNTT. */ 1029130812Smarcel dnttpointer memtype ; /* Type of member. */ 1030130812Smarcel}; 1031130812Smarcel 1032130812Smarcel/* The DNTT_TYPE_CLASS symbol is emitted to describe a class type. 1033130812Smarcel "memberlist" points to a chained list of FIELD or GENFIELD records 1034130812Smarcel indicating the class members. "parentlist" points to a chained list 1035130812Smarcel of INHERITANCE records indicating classes from which we inherit 1036130812Smarcel fields. */ 1037130812Smarcel 1038130812Smarcelstruct dntt_type_class 1039130812Smarcel{ 1040130812Smarcel unsigned int extension: 1; /* Always zero. */ 1041130812Smarcel unsigned int kind: 10; /* Always DNTT_TYPE_CLASS. */ 1042130812Smarcel unsigned int abstract: 1; /* Is this an abstract class? */ 1043130812Smarcel unsigned int class_decl: 2; /* 0=class,1=union,2=struct. */ 1044130812Smarcel unsigned int expansion: 1; /* 1=template expansion. */ 1045130812Smarcel unsigned int unused: 17; 1046130812Smarcel dnttpointer memberlist ; /* Ptr to chain of [GEN]FIELDs. */ 1047130812Smarcel unsigned long vtbl_loc ; /* Offset in obj of ptr to vtbl. */ 1048130812Smarcel dnttpointer parentlist ; /* Ptr to K_INHERITANCE list. */ 1049130812Smarcel unsigned long bitlength ; /* Total at this level. */ 1050130812Smarcel dnttpointer identlist ; /* Ptr to chain of class ident's. */ 1051130812Smarcel dnttpointer friendlist ; /* Ptr to K_FRIEND list. */ 1052130812Smarcel dnttpointer templateptr ; /* Ptr to template. */ 1053130812Smarcel dnttpointer nextexp ; /* Ptr to next expansion. */ 1054130812Smarcel}; 1055130812Smarcel 1056130812Smarcel/* Class members are indicated via either the FIELD record (for 1057130812Smarcel data members, same as for C struct fields), or by the GENFIELD record 1058130812Smarcel (for member functions). */ 1059130812Smarcel 1060130812Smarcelstruct dntt_type_genfield 1061130812Smarcel{ 1062130812Smarcel unsigned int extension: 1; /* Always zero. */ 1063130812Smarcel unsigned int kind: 10; /* Always DNTT_TYPE_GENFIELD. */ 1064130812Smarcel unsigned int visibility: 2; /* Pub = 0, prot = 1, priv = 2. */ 1065130812Smarcel unsigned int a_union: 1; /* 1 => anonymous union member. */ 1066130812Smarcel unsigned int unused: 18; 1067130812Smarcel dnttpointer field ; /* Pointer to field or qualifier. */ 1068130812Smarcel dnttpointer nextfield ; /* Pointer to next field. */ 1069130812Smarcel}; 1070130812Smarcel 1071130812Smarcel/* C++ virtual functions. */ 1072130812Smarcel 1073130812Smarcelstruct dntt_type_vfunc 1074130812Smarcel{ 1075130812Smarcel unsigned int extension: 1; /* always zero */ 1076130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_VFUNC */ 1077130812Smarcel unsigned int pure: 1; /* pure virtual function ? */ 1078130812Smarcel unsigned int unused: 20; 1079130812Smarcel dnttpointer funcptr ; /* points to FUNCTION symbol */ 1080130812Smarcel unsigned long vtbl_offset ; /* offset into vtbl for virtual */ 1081130812Smarcel}; 1082130812Smarcel 1083130812Smarcel/* Not precisely sure what this is intended for - DDE ignores it. */ 1084130812Smarcel 1085130812Smarcelstruct dntt_type_memaccess 1086130812Smarcel{ 1087130812Smarcel unsigned int extension: 1; /* always zero */ 1088130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_MEMACCESS */ 1089130812Smarcel unsigned int unused: 21; 1090130812Smarcel dnttpointer classptr ; /* pointer to base class */ 1091130812Smarcel dnttpointer field ; /* pointer field */ 1092130812Smarcel}; 1093130812Smarcel 1094130812Smarcel/* The DNTT_TYPE_INHERITANCE record describes derived classes. 1095130812Smarcel In particular, the "parentlist" field of the CLASS record points 1096130812Smarcel to a list of INHERITANCE records for classes from which we 1097130812Smarcel inherit members. */ 1098130812Smarcel 1099130812Smarcelstruct dntt_type_inheritance 1100130812Smarcel{ 1101130812Smarcel unsigned int extension: 1; /* always zero */ 1102130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_INHERITANCE */ 1103130812Smarcel unsigned int Virtual: 1; /* virtual base class ? */ 1104130812Smarcel unsigned int visibility: 2; /* pub = 0, prot = 1, priv = 2 */ 1105130812Smarcel unsigned int unused: 18; 1106130812Smarcel dnttpointer classname ; /* first parent class, if any */ 1107130812Smarcel unsigned long offset ; /* offset to start of base class */ 1108130812Smarcel dnttpointer next ; /* pointer to next K_INHERITANCE */ 1109130812Smarcel unsigned long future[2] ; /* padding to 3-word block end */ 1110130812Smarcel}; 1111130812Smarcel 1112130812Smarcel/* C++ "friend" classes ... */ 1113130812Smarcel 1114130812Smarcelstruct dntt_type_friend_class 1115130812Smarcel{ 1116130812Smarcel unsigned int extension: 1; /* always zero */ 1117130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_CLASS */ 1118130812Smarcel unsigned int unused: 21; 1119130812Smarcel dnttpointer classptr ; /* pointer to class DNTT */ 1120130812Smarcel dnttpointer next ; /* next DNTT_FRIEND */ 1121130812Smarcel}; 1122130812Smarcel 1123130812Smarcelstruct dntt_type_friend_func 1124130812Smarcel{ 1125130812Smarcel unsigned int extension: 1; /* always zero */ 1126130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_FRIEND_FUNC */ 1127130812Smarcel unsigned int unused: 21; 1128130812Smarcel dnttpointer funcptr ; /* pointer to function */ 1129130812Smarcel dnttpointer classptr ; /* pointer to class DNTT */ 1130130812Smarcel dnttpointer next ; /* next DNTT_FRIEND */ 1131130812Smarcel unsigned long future[2] ; /* padding to 3-word block end */ 1132130812Smarcel}; 1133130812Smarcel 1134130812Smarcel/* DDE appears to ignore the DNTT_TYPE_MODIFIER record. 1135130812Smarcel It could perhaps be used to give better "ptype" output in GDB; 1136130812Smarcel otherwise it is probably safe for GDB to ignore it also. */ 1137130812Smarcel 1138130812Smarcelstruct dntt_type_modifier 1139130812Smarcel{ 1140130812Smarcel unsigned int extension: 1; /* always zero */ 1141130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_MODIFIER */ 1142130812Smarcel unsigned int m_const: 1; /* const */ 1143130812Smarcel unsigned int m_static: 1; /* static */ 1144130812Smarcel unsigned int m_void: 1; /* void */ 1145130812Smarcel unsigned int m_volatile: 1; /* volatile */ 1146130812Smarcel unsigned int m_duplicate: 1; /* duplicate */ 1147130812Smarcel unsigned int unused: 16; 1148130812Smarcel dnttpointer type ; /* subtype */ 1149130812Smarcel unsigned long future ; /* padding to 3-word block end */ 1150130812Smarcel}; 1151130812Smarcel 1152130812Smarcel/* I'm not sure what this was intended for - DDE ignores it. */ 1153130812Smarcel 1154130812Smarcelstruct dntt_type_object_id 1155130812Smarcel{ 1156130812Smarcel unsigned int extension: 1; /* always zero */ 1157130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_OBJECT_ID */ 1158130812Smarcel unsigned int indirect: 1; /* Is object_ident addr of addr? */ 1159130812Smarcel unsigned int unused: 20; 1160130812Smarcel unsigned long object_ident ; /* object identifier */ 1161130812Smarcel unsigned long offset ; /* offset to start of base class */ 1162130812Smarcel dnttpointer next ; /* pointer to next K_OBJECT_ID */ 1163130812Smarcel unsigned long segoffset ; /* for linker fixup */ 1164130812Smarcel unsigned long future ; /* padding to 3-word block end */ 1165130812Smarcel}; 1166130812Smarcel 1167130812Smarcel/* No separate dntt_type_memfunc; same as dntt_type_func */ 1168130812Smarcel 1169130812Smarcel/* Symbol records to support templates. These only get used 1170130812Smarcel in DDE's "describe" output (like GDB's "ptype"). */ 1171130812Smarcel 1172130812Smarcel/* The TEMPLATE record is the header for a template-class. 1173130812Smarcel Like the CLASS record, a TEMPLATE record has a memberlist that 1174130812Smarcel points to a list of template members. It also has an arglist 1175130812Smarcel pointing to a list of TEMPLATE_ARG records. */ 1176130812Smarcel 1177130812Smarcelstruct dntt_type_template 1178130812Smarcel{ 1179130812Smarcel unsigned int extension: 1; /* always zero */ 1180130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_TEMPLATE */ 1181130812Smarcel unsigned int abstract: 1; /* is this an abstract class? */ 1182130812Smarcel unsigned int class_decl: 2; /* 0=class,1=union,2=struct */ 1183130812Smarcel unsigned int unused: 18; 1184130812Smarcel dnttpointer memberlist ; /* ptr to chain of K_[GEN]FIELDs */ 1185130812Smarcel long unused2 ; /* offset in obj of ptr to vtbl */ 1186130812Smarcel dnttpointer parentlist ; /* ptr to K_INHERITANCE list */ 1187130812Smarcel unsigned long bitlength ; /* total at this level */ 1188130812Smarcel dnttpointer identlist ; /* ptr to chain of class ident's */ 1189130812Smarcel dnttpointer friendlist ; /* ptr to K_FRIEND list */ 1190130812Smarcel dnttpointer arglist ; /* ptr to argument list */ 1191130812Smarcel dnttpointer expansions ; /* ptr to expansion list */ 1192130812Smarcel}; 1193130812Smarcel 1194130812Smarcel/* Template-class arguments are a list of TEMPL_ARG records 1195130812Smarcel chained together. The "name" field is the name of the formal. 1196130812Smarcel E.g.: 1197130812Smarcel 1198130812Smarcel template <class T> class q { ... }; 1199130812Smarcel 1200130812Smarcel Then "T" is the name of the formal argument. */ 1201130812Smarcel 1202130812Smarcelstruct dntt_type_templ_arg 1203130812Smarcel{ 1204130812Smarcel unsigned int extension: 1; /* always zero */ 1205130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_TEMPL_ARG */ 1206130812Smarcel unsigned int usagetype: 1; /* 0 type-name 1 expression */ 1207130812Smarcel unsigned int unused: 20; 1208130812Smarcel vtpointer name ; /* name of argument */ 1209130812Smarcel dnttpointer type ; /* for non type arguments */ 1210130812Smarcel dnttpointer nextarg ; /* Next argument if any */ 1211130812Smarcel long future[2] ; /* padding to 3-word block end */ 1212130812Smarcel}; 1213130812Smarcel 1214130812Smarcel/* FUNC_TEMPLATE records are sort of like FUNCTION, but are emitted 1215130812Smarcel for template member functions. E.g., 1216130812Smarcel 1217130812Smarcel template <class T> class q 1218130812Smarcel { 1219130812Smarcel ... 1220130812Smarcel void f(); 1221130812Smarcel ... 1222130812Smarcel }; 1223130812Smarcel 1224130812Smarcel Within the list of FIELDs/GENFIELDs defining the member list 1225130812Smarcel of the template "q", "f" would appear as a FUNC_TEMPLATE. 1226130812Smarcel We'll also see instances of FUNCTION "f" records for each 1227130812Smarcel instantiation of the template. */ 1228130812Smarcel 1229130812Smarcelstruct dntt_type_func_template 1230130812Smarcel{ 1231130812Smarcel unsigned int extension: 1; /* always zero */ 1232130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_FUNC_TEMPLATE */ 1233130812Smarcel unsigned int public: 1; /* 1 => globally visible */ 1234130812Smarcel unsigned int language: 4; /* type of language */ 1235130812Smarcel unsigned int level: 5; /* nesting level (top level = 0)*/ 1236130812Smarcel unsigned int optimize: 2; /* level of optimization */ 1237130812Smarcel unsigned int varargs: 1; /* ellipses. Pascal/800 later */ 1238130812Smarcel unsigned int info: 4; /* lang-specific stuff; F_xxxx */ 1239130812Smarcel unsigned int inlined: 1; 1240130812Smarcel unsigned int localloc: 1; /* 0 at top, 1 at end of block */ 1241130812Smarcel unsigned int unused: 2; 1242130812Smarcel vtpointer name ; /* name of function */ 1243130812Smarcel vtpointer alias ; /* alternate name, if any */ 1244130812Smarcel dnttpointer firstparam ; /* first FPARAM, if any */ 1245130812Smarcel dnttpointer retval ; /* return type, if any */ 1246130812Smarcel dnttpointer arglist ; /* ptr to argument list */ 1247130812Smarcel}; 1248130812Smarcel 1249130812Smarcel/* LINK is apparently intended to link together function template 1250130812Smarcel definitions with their instantiations. However, it is not clear 1251130812Smarcel why this would be needed, except to provide the information on 1252130812Smarcel a "ptype" command. And as far as I can tell, aCC does not 1253130812Smarcel generate this record. */ 1254130812Smarcel 1255130812Smarcelstruct dntt_type_link 1256130812Smarcel{ 1257130812Smarcel unsigned int extension: 1; /* always zero */ 1258130812Smarcel unsigned int kind: 10; /* always DNTT_TYPE_LINK */ 1259130812Smarcel unsigned int linkKind: 4; /* always LINK_UNKNOWN */ 1260130812Smarcel unsigned int unused: 17; 1261130812Smarcel long future1 ; /* expansion */ 1262130812Smarcel dnttpointer ptr1 ; /* link from template */ 1263130812Smarcel dnttpointer ptr2 ; /* to expansion */ 1264130812Smarcel long future[2] ; /* padding to 3-word block end */ 1265130812Smarcel}; 1266130812Smarcel 1267130812Smarcel/* end of C++ specific SOM's. */ 1268130812Smarcel 1269130812Smarcel/* DNTT_TYPE_DYN_ARRAY_DESC is unused by GDB */ 1270130812Smarcel/* DNTT_TYPE_DESC_SUBRANGE is unused by GDB */ 1271130812Smarcel/* DNTT_TYPE_BEGIN_EXT is unused by GDB */ 1272130812Smarcel/* DNTT_TYPE_INLN is unused by GDB */ 1273130812Smarcel/* DNTT_TYPE_INLN_LIST is unused by GDB */ 1274130812Smarcel/* DNTT_TYPE_ALIAS is unused by GDB */ 1275130812Smarcel 1276130812Smarcelstruct dntt_type_doc_function 1277130812Smarcel{ 1278130812Smarcel unsigned int extension: 1; /* always zero */ 1279130812Smarcel unsigned int kind: 10; /* K_DOC_FUNCTION or */ 1280130812Smarcel /* K_DOC_MEMFUNC */ 1281130812Smarcel unsigned int global: 1; /* 1 => globally visible */ 1282130812Smarcel unsigned int language: 4; /* type of language */ 1283130812Smarcel unsigned int level: 5; /* nesting level (top level = 0)*/ 1284130812Smarcel unsigned int optimize: 2; /* level of optimization */ 1285130812Smarcel unsigned int varargs: 1; /* ellipses. Pascal/800 later */ 1286130812Smarcel unsigned int info: 4; /* lang-specific stuff; F_xxxx */ 1287130812Smarcel unsigned int inlined: 1; 1288130812Smarcel unsigned int localloc: 1; /* 0 at top, 1 at end of block */ 1289130812Smarcel unsigned int expansion: 1; /* 1 = function expansion */ 1290130812Smarcel unsigned int doc_clone: 1; 1291130812Smarcel vtpointer name; /* name of function */ 1292130812Smarcel vtpointer alias; /* alternate name, if any */ 1293130812Smarcel dnttpointer firstparam; /* first FPARAM, if any */ 1294130812Smarcel sltpointer address; /* code and text locations */ 1295130812Smarcel CORE_ADDR entryaddr; /* address of entry point */ 1296130812Smarcel dnttpointer retval; /* return type, if any */ 1297130812Smarcel CORE_ADDR lowaddr; /* lowest address of function */ 1298130812Smarcel CORE_ADDR hiaddr; /* highest address of function */ 1299130812Smarcel dnttpointer inline_list; /* pointer to first inline */ 1300130812Smarcel ltpointer lt_offset; /* start of frag/cp line table */ 1301130812Smarcel ctxtpointer ctxt_offset; /* start of context table for this routine */ 1302130812Smarcel}; 1303130812Smarcel 1304130812Smarcel/* DNTT_TYPE_DOC_MEMFUNC is unused by GDB */ 1305130812Smarcel 1306130812Smarcel/* DNTT_TYPE_GENERIC and DNTT_TYPE_BLOCK are convience structures 1307130812Smarcel so we can examine a DNTT entry in a generic fashion. */ 1308130812Smarcelstruct dntt_type_generic 1309130812Smarcel{ 1310130812Smarcel unsigned int word[9]; 1311130812Smarcel}; 1312130812Smarcel 1313130812Smarcelstruct dntt_type_block 1314130812Smarcel{ 1315130812Smarcel unsigned int extension: 1; 1316130812Smarcel unsigned int kind: 10; 1317130812Smarcel unsigned int unused: 21; 1318130812Smarcel unsigned int word[2]; 1319130812Smarcel}; 1320130812Smarcel 1321130812Smarcel/* One entry in a DNTT (either the LNTT or GNTT). 1322130812Smarcel This is a union of the above 60 or so structure definitions. */ 1323130812Smarcel 1324130812Smarcelunion dnttentry 1325130812Smarcel{ 1326130812Smarcel struct dntt_type_srcfile dsfile; 1327130812Smarcel struct dntt_type_module dmodule; 1328130812Smarcel struct dntt_type_function dfunc; 1329130812Smarcel struct dntt_type_function dentry; 1330130812Smarcel struct dntt_type_begin dbegin; 1331130812Smarcel struct dntt_type_end dend; 1332130812Smarcel struct dntt_type_fparam dfparam; 1333130812Smarcel struct dntt_type_svar dsvar; 1334130812Smarcel struct dntt_type_dvar ddvar; 1335130812Smarcel struct dntt_type_const dconst; 1336130812Smarcel struct dntt_type_type dtype; 1337130812Smarcel struct dntt_type_type dtag; 1338130812Smarcel struct dntt_type_pointer dptr; 1339130812Smarcel struct dntt_type_enum denum; 1340130812Smarcel struct dntt_type_memenum dmember; 1341130812Smarcel struct dntt_type_set dset; 1342130812Smarcel struct dntt_type_subrange dsubr; 1343130812Smarcel struct dntt_type_array darray; 1344130812Smarcel struct dntt_type_struct dstruct; 1345130812Smarcel struct dntt_type_union dunion; 1346130812Smarcel struct dntt_type_field dfield; 1347130812Smarcel struct dntt_type_functype dfunctype; 1348130812Smarcel struct dntt_type_with dwith; 1349130812Smarcel struct dntt_type_function dblockdata; 1350130812Smarcel struct dntt_type_class_scope dclass_scope; 1351130812Smarcel struct dntt_type_pointer dreference; 1352130812Smarcel struct dntt_type_ptrmem dptrmem; 1353130812Smarcel struct dntt_type_ptrmemfunc dptrmemfunc; 1354130812Smarcel struct dntt_type_class dclass; 1355130812Smarcel struct dntt_type_genfield dgenfield; 1356130812Smarcel struct dntt_type_vfunc dvfunc; 1357130812Smarcel struct dntt_type_memaccess dmemaccess; 1358130812Smarcel struct dntt_type_inheritance dinheritance; 1359130812Smarcel struct dntt_type_friend_class dfriend_class; 1360130812Smarcel struct dntt_type_friend_func dfriend_func; 1361130812Smarcel struct dntt_type_modifier dmodifier; 1362130812Smarcel struct dntt_type_object_id dobject_id; 1363130812Smarcel struct dntt_type_template dtemplate; 1364130812Smarcel struct dntt_type_templ_arg dtempl_arg; 1365130812Smarcel struct dntt_type_func_template dfunc_template; 1366130812Smarcel struct dntt_type_link dlink; 1367130812Smarcel struct dntt_type_doc_function ddocfunc; 1368130812Smarcel struct dntt_type_generic dgeneric; 1369130812Smarcel struct dntt_type_block dblock; 1370130812Smarcel}; 1371130812Smarcel 1372130812Smarcel/* Source line entry types. */ 1373130812Smarcelenum slttype 1374130812Smarcel{ 1375130812Smarcel SLT_NORMAL, 1376130812Smarcel SLT_SRCFILE, 1377130812Smarcel SLT_MODULE, 1378130812Smarcel SLT_FUNCTION, 1379130812Smarcel SLT_ENTRY, 1380130812Smarcel SLT_BEGIN, 1381130812Smarcel SLT_END, 1382130812Smarcel SLT_WITH, 1383130812Smarcel SLT_EXIT, 1384130812Smarcel SLT_ASSIST, 1385130812Smarcel SLT_MARKER, 1386130812Smarcel SLT_CLASS_SCOPE, 1387130812Smarcel SLT_INLN, 1388130812Smarcel SLT_NORMAL_OFFSET, 1389130812Smarcel}; 1390130812Smarcel 1391130812Smarcel/* A normal source line entry. Simply provides a mapping of a source 1392130812Smarcel line number to a code address. 1393130812Smarcel 1394130812Smarcel SLTDESC will always be SLT_NORMAL or SLT_EXIT. */ 1395130812Smarcel 1396130812Smarcelstruct slt_normal 1397130812Smarcel{ 1398130812Smarcel unsigned int sltdesc: 4; 1399130812Smarcel unsigned int line: 28; 1400130812Smarcel CORE_ADDR address; 1401130812Smarcel}; 1402130812Smarcel 1403130812Smarcelstruct slt_normal_off 1404130812Smarcel{ 1405130812Smarcel unsigned int sltdesc: 4; 1406130812Smarcel unsigned int offset: 6; 1407130812Smarcel unsigned int line: 22; 1408130812Smarcel CORE_ADDR address; 1409130812Smarcel}; 1410130812Smarcel 1411130812Smarcel/* A special source line entry. Provides a mapping of a declaration 1412130812Smarcel to a line number. These entries point back into the DNTT which 1413130812Smarcel references them. */ 1414130812Smarcel 1415130812Smarcelstruct slt_special 1416130812Smarcel{ 1417130812Smarcel unsigned int sltdesc: 4; 1418130812Smarcel unsigned int line: 28; 1419130812Smarcel dnttpointer backptr; 1420130812Smarcel}; 1421130812Smarcel 1422130812Smarcel/* Used to describe nesting. 1423130812Smarcel 1424130812Smarcel For nested languages, an slt_assist entry must follow each SLT_FUNC 1425130812Smarcel entry in the SLT. The address field will point forward to the 1426130812Smarcel first slt_normal entry within the function's scope. */ 1427130812Smarcel 1428130812Smarcelstruct slt_assist 1429130812Smarcel{ 1430130812Smarcel unsigned int sltdesc: 4; 1431130812Smarcel unsigned int unused: 28; 1432130812Smarcel sltpointer address; 1433130812Smarcel}; 1434130812Smarcel 1435130812Smarcelstruct slt_generic 1436130812Smarcel{ 1437130812Smarcel unsigned int word[2]; 1438130812Smarcel}; 1439130812Smarcel 1440130812Smarcelunion sltentry 1441130812Smarcel{ 1442130812Smarcel struct slt_normal snorm; 1443130812Smarcel struct slt_normal_off snormoff; 1444130812Smarcel struct slt_special sspec; 1445130812Smarcel struct slt_assist sasst; 1446130812Smarcel struct slt_generic sgeneric; 1447130812Smarcel}; 1448130812Smarcel 1449130812Smarcel/* $LINES$ declarations 1450130812Smarcel This is the line table used for optimized code, which is only present 1451130812Smarcel in the new $PROGRAM_INFO$ debug space. */ 1452130812Smarcel 1453130812Smarcel#define DST_LN_ESCAPE_FLAG1 15 1454130812Smarcel#define DST_LN_ESCAPE_FLAG2 14 1455130812Smarcel#define DST_LN_CTX_SPEC1 13 1456130812Smarcel#define DST_LN_CTX_SPEC2 12 1457130812Smarcel 1458130812Smarcel/* Escape function codes: */ 1459130812Smarcel 1460130812Smarceltypedef enum 1461130812Smarcel{ 1462130812Smarcel dst_ln_pad, /* pad byte */ 1463130812Smarcel dst_ln_escape_1, /* reserved */ 1464130812Smarcel dst_ln_dpc1_dln1, /* 1 byte line delta, 1 byte pc delta */ 1465130812Smarcel dst_ln_dpc2_dln2, /* 2 bytes line delta, 2 bytes pc delta */ 1466130812Smarcel dst_ln_pc4_ln4, /* 4 bytes ABSOLUTE line number, 4 bytes ABSOLUTE pc */ 1467130812Smarcel dst_ln_dpc0_dln1, /* 1 byte line delta, pc delta = 0 */ 1468130812Smarcel dst_ln_ln_off_1, /* statement escape, stmt # = 1 (2nd stmt on line) */ 1469130812Smarcel dst_ln_ln_off, /* statement escape, stmt # = next byte */ 1470130812Smarcel dst_ln_entry, /* entry escape, next byte is entry number */ 1471130812Smarcel dst_ln_exit, /* exit escape */ 1472130812Smarcel dst_ln_stmt_end, /* gap escape, 4 bytes pc delta */ 1473130812Smarcel dst_ln_stmt_cp, /* current stmt is a critical point */ 1474130812Smarcel dst_ln_escape_12, /* reserved */ 1475130812Smarcel dst_ln_escape_13, /* this is an exception site record */ 1476130812Smarcel dst_ln_nxt_byte, /* next byte contains the real escape code */ 1477130812Smarcel dst_ln_end, /* end escape, final entry follows */ 1478130812Smarcel dst_ln_escape1_END_OF_ENUM 1479130812Smarcel} 1480130812Smarceldst_ln_escape1_t; 1481130812Smarcel 1482130812Smarceltypedef enum 1483130812Smarcel{ 1484130812Smarcel dst_ln_ctx_1, /* next byte describes context switch with 5-bit */ 1485130812Smarcel /* index into the image table and 3-bit run length. */ 1486130812Smarcel /* If run length is 0, end with another cxt specifier or ctx_end */ 1487130812Smarcel dst_ln_ctx_2, /* next 2 bytes switch context: 13 bit index, 3 bit run length */ 1488130812Smarcel dst_ln_ctx_4, /* next 4 bytes switch context: 29 bit index, 3 bit run length */ 1489130812Smarcel dst_ln_ctx_end, /* end current context */ 1490130812Smarcel dst_ln_col_run_1, /* next byte is column position of start of next statement, */ 1491130812Smarcel /* following byte is length of statement */ 1492130812Smarcel dst_ln_col_run_2, /* next 2 bytes is column position of start of next statement, */ 1493130812Smarcel /* following 2 bytes is length of statement */ 1494130812Smarcel dst_ln_init_base1, /* next 4 bytes are absolute PC, followed by 1 byte of line number */ 1495130812Smarcel dst_ln_init_base2, /* next 4 bytes are absolute PC, followed by 2 bytes of line number */ 1496130812Smarcel dst_ln_init_base3, /* next 4 bytes are absolute PC, followed by 3 bytes of line number */ 1497130812Smarcel dst_ln_escape2_END_OF_ENUM 1498130812Smarcel} 1499130812Smarceldst_ln_escape2_t; 1500130812Smarcel 1501130812Smarceltypedef union 1502130812Smarcel{ 1503130812Smarcel struct 1504130812Smarcel { 1505130812Smarcel unsigned int pc_delta : 4; /* 4 bit pc delta */ 1506130812Smarcel int ln_delta : 4; /* 4 bit line number delta */ 1507130812Smarcel } 1508130812Smarcel delta; 1509130812Smarcel 1510130812Smarcel struct 1511130812Smarcel { 1512130812Smarcel unsigned int esc_flag : 4; /* alias for pc_delta */ 1513130812Smarcel unsigned int esc_code : 4; /* escape function code (dst_ln_escape1_t, or ...2_t */ 1514130812Smarcel } 1515130812Smarcel esc; 1516130812Smarcel 1517130812Smarcel struct 1518130812Smarcel { 1519130812Smarcel unsigned int esc_flag : 4; /* dst_ln_ctx_spec1, or dst_ln_ctx_spec2 */ 1520130812Smarcel unsigned int run_length : 2; 1521130812Smarcel unsigned int ctx_index : 2; /* ...spec2 contains index; ...spec1, index - 4 */ 1522130812Smarcel } 1523130812Smarcel ctx_spec; 1524130812Smarcel 1525130812Smarcel char sdata; /* signed data byte */ 1526130812Smarcel unsigned char udata; /* unsigned data byte */ 1527130812Smarcel} 1528130812Smarceldst_ln_entry_t, 1529130812Smarcel * dst_ln_entry_ptr_t; 1530130812Smarcel 1531130812Smarcel/* Warning: although the above union occupies only 1 byte the compiler treats 1532130812Smarcel it as having size 2 (the minimum size of a struct). Therefore a sequence of 1533130812Smarcel dst_ln_entry_t's cannot be described as an array, and walking through such a 1534130812Smarcel sequence requires convoluted code such as 1535130812Smarcel ln_ptr = (dst_ln_entry_ptr_t) (char*) ln_ptr + 1 1536130812Smarcel We regret the inconvenience. */ 1537130812Smarcel 1538130812Smarcel/* Structure for interpreting the byte following a dst_ln_ctx1 entry. */ 1539130812Smarceltypedef struct 1540130812Smarcel{ 1541130812Smarcel unsigned int ctx1_index : 5; /* 5 bit index into context table */ 1542130812Smarcel unsigned int ctx1_run_length : 3; /* 3 bit run length */ 1543130812Smarcel} dst_ln_ctx1_t, 1544130812Smarcel *dst_ln_ctx1_ptr_t; 1545130812Smarcel 1546130812Smarcel/* Structure for interpreting the bytes following a dst_ln_ctx2 entry. */ 1547130812Smarceltypedef struct 1548130812Smarcel{ 1549130812Smarcel unsigned int ctx2_index : 13; /* 13 bit index into context table */ 1550130812Smarcel unsigned int ctx2_run_length : 3; /* 3 bit run length */ 1551130812Smarcel} dst_ln_ctx2_t, 1552130812Smarcel *dst_ln_ctx2_ptr_t; 1553130812Smarcel 1554130812Smarcel/* Structure for interpreting the bytes following a dst_ln_ctx4 entry. */ 1555130812Smarceltypedef struct 1556130812Smarcel{ 1557130812Smarcel unsigned int ctx4_index : 29; /* 29 bit index into context table */ 1558130812Smarcel unsigned int ctx4_run_length : 3; /* 3 bit run length */ 1559130812Smarcel} dst_ln_ctx4_t, 1560130812Smarcel *dst_ln_ctx4_ptr_t; 1561130812Smarcel 1562130812Smarcel 1563130812Smarcel/* PXDB definitions. 1564130812Smarcel 1565130812Smarcel PXDB is a post-processor which takes the executable file 1566130812Smarcel and massages the debug information so that the debugger may 1567130812Smarcel start up and run more efficiently. Some of the tasks 1568130812Smarcel performed by PXDB are: 1569130812Smarcel 1570130812Smarcel o Remove duplicate global type and variable information 1571130812Smarcel from the GNTT, 1572130812Smarcel 1573130812Smarcel o Append the GNTT onto the end of the LNTT and place both 1574130812Smarcel back in the LNTT section, 1575130812Smarcel 1576130812Smarcel o Build quick look-up tables (description follows) for 1577130812Smarcel files, procedures, modules, and paragraphs (for Cobol), 1578130812Smarcel placing these in the GNTT section, 1579130812Smarcel 1580130812Smarcel o Reconstruct the header appearing in the header section 1581130812Smarcel to access this information. 1582130812Smarcel 1583130812Smarcel The "quick look-up" tables are in the $GNTT$ sub-space, in 1584130812Smarcel the following order: 1585130812Smarcel 1586130812Smarcel Procedures -sorted by address 1587130812Smarcel Source files -sorted by address (of the 1588130812Smarcel generated code from routines) 1589130812Smarcel Modules -sorted by address 1590130812Smarcel Classes -<unsorted?> 1591130812Smarcel Address Alias -sorted by index <?> 1592130812Smarcel Object IDs -sorted by object identifier 1593130812Smarcel 1594130812Smarcel Most quick entries have (0-based) indices into the LNTT tables to 1595130812Smarcel the full entries for the item it describes. 1596130812Smarcel 1597130812Smarcel The post-PXDB header is in the $HEADER$ sub-space. Alas, it 1598130812Smarcel occurs in different forms, depending on the optimization level 1599130812Smarcel in the compilation step and whether PXDB was run or not. The 1600130812Smarcel worst part is the forms aren't self-describing, so we'll have 1601130812Smarcel to grovel in the bits to figure out what kind we're looking at 1602130812Smarcel (see hp_get_header in hp-psymtab-read.c). */ 1603130812Smarcel 1604130812Smarcel/* PXDB versions. */ 1605130812Smarcel 1606130812Smarcel#define PXDB_VERSION_CPLUSPLUS 1 1607130812Smarcel#define PXDB_VERSION_7_4 2 1608130812Smarcel#define PXDB_VERSION_CPP_30 3 1609130812Smarcel#define PXDB_VERSION_DDE_3_2A 4 1610130812Smarcel#define PXDB_VERSION_DDE_3_2 5 1611130812Smarcel#define PXDB_VERSION_DDE_4_0 6 1612130812Smarcel 1613130812Smarcel#define PXDB_VERSION_2_1 1 1614130812Smarcel 1615130812Smarcel/* Header version for the case that there is no DOC info 1616130812Smarcel but the executable has been processed by pxdb (the easy 1617130812Smarcel case, from "cc -g"). */ 1618130812Smarcel 1619130812Smarceltypedef struct PXDB_struct 1620130812Smarcel{ 1621130812Smarcel int pd_entries; /* # of entries in function look-up table */ 1622130812Smarcel int fd_entries; /* # of entries in file look-up table */ 1623130812Smarcel int md_entries; /* # of entries in module look-up table */ 1624130812Smarcel unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ 1625130812Smarcel unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ 1626130812Smarcel unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ 1627130812Smarcel /* used for version check in xdb */ 1628130812Smarcel unsigned int inlined: 1; /* one or more functions have been inlined */ 1629130812Smarcel unsigned int spare:12; 1630130812Smarcel short version; /* pxdb header version */ 1631130812Smarcel int globals; /* index into the DNTT where GNTT begins */ 1632130812Smarcel unsigned int time; /* modify time of file before being pxdbed */ 1633130812Smarcel int pg_entries; /* # of entries in label look-up table */ 1634130812Smarcel int functions; /* actual number of functions */ 1635130812Smarcel int files; /* actual number of files */ 1636130812Smarcel int cd_entries; /* # of entries in class look-up table */ 1637130812Smarcel int aa_entries; /* # of entries in addr alias look-up table */ 1638130812Smarcel int oi_entries; /* # of entries in object id look-up table */ 1639130812Smarcel} PXDB_header, *PXDB_header_ptr; 1640130812Smarcel 1641130812Smarcel/* Header version for the case that there is no DOC info and the 1642130812Smarcel executable has NOT been processed by pxdb. */ 1643130812Smarcel 1644130812Smarceltypedef struct XDB_header_struct 1645130812Smarcel{ 1646130812Smarcel long gntt_length; 1647130812Smarcel long lntt_length; 1648130812Smarcel long slt_length; 1649130812Smarcel long vt_length; 1650130812Smarcel long xt_length; 1651130812Smarcel} XDB_header; 1652130812Smarcel 1653130812Smarcel/* Header version for the case that there is DOC info and the 1654130812Smarcel executable has been processed by pxdb. */ 1655130812Smarcel 1656130812Smarceltypedef struct DOC_info_PXDB_header_struct 1657130812Smarcel{ 1658130812Smarcel unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ 1659130812Smarcel unsigned int doc_header: 1; /* bit set if this is doc-style header */ 1660130812Smarcel unsigned int version: 8; /* version of pxdb see defines 1661130812Smarcel PXDB_VERSION_* in this file. */ 1662130812Smarcel unsigned int reserved_for_flags: 16;/* for future use; -- must be 1663130812Smarcel set to zero. */ 1664130812Smarcel unsigned int has_aux_pd_table: 1; /* $GNTT$ has aux PD table */ 1665130812Smarcel unsigned int has_expr_table: 1; /* space has $EXPR$ */ 1666130812Smarcel unsigned int has_range_table: 1; /* space has $RANGE$ */ 1667130812Smarcel unsigned int has_context_table: 1; /* space has $SRC_CTXT$ */ 1668130812Smarcel unsigned int has_lines_table: 1; /* space contains a $LINES$ 1669130812Smarcel subspace for line tables. */ 1670130812Smarcel unsigned int has_lt_offset_map: 1; /* space contains an lt_offset 1671130812Smarcel subspace for line table mapping. */ 1672130812Smarcel /* The following fields are the same as those in the PXDB_header in $DEBUG$ */ 1673130812Smarcel int pd_entries; /* # of entries in function look-up table */ 1674130812Smarcel int fd_entries; /* # of entries in file look-up table */ 1675130812Smarcel int md_entries; /* # of entries in module look-up table */ 1676130812Smarcel unsigned int pxdbed : 1; /* 1 => file has been preprocessed */ 1677130812Smarcel unsigned int bighdr : 1; /* 1 => this header contains 'time' word */ 1678130812Smarcel unsigned int sa_header : 1;/* 1 => created by SA version of pxdb */ 1679130812Smarcel /* used for version check in xdb */ 1680130812Smarcel unsigned int inlined: 1; /* one or more functions have been inlined */ 1681130812Smarcel unsigned int spare : 28; 1682130812Smarcel int globals; /* index into the DNTT where GNTT begins */ 1683130812Smarcel unsigned int time; /* modify time of file before being pxdbed */ 1684130812Smarcel int pg_entries; /* # of entries in label look-up table */ 1685130812Smarcel int functions; /* actual number of functions */ 1686130812Smarcel int files; /* actual number of files */ 1687130812Smarcel int cd_entries; /* # of entries in class look-up table */ 1688130812Smarcel int aa_entries; /* # of entries in addr alias look-up table */ 1689130812Smarcel int oi_entries; /* # of entries in object id look-up table */ 1690130812Smarcel} DOC_info_PXDB_header; 1691130812Smarcel 1692130812Smarcel/* Header version for the case that there is DOC info and the 1693130812Smarcel executable has NOT been processed by pxdb. */ 1694130812Smarcel 1695130812Smarceltypedef struct DOC_info_header_struct 1696130812Smarcel{ 1697130812Smarcel unsigned int xdb_header: 1; /* bit set if this is post-3.1 xdb */ 1698130812Smarcel unsigned int doc_header: 1; /* bit set if this is doc-style header*/ 1699130812Smarcel unsigned int version: 8; /* version of debug/header 1700130812Smarcel format. For 10.0 the value 1701130812Smarcel will be 1. For "Davis" the value is 2. */ 1702130812Smarcel unsigned int reserved_for_flags: 18; /* for future use; -- must be set to zero. */ 1703130812Smarcel unsigned int has_range_table: 1; /* space contains a $RANGE$ subspace for variable ranges. */ 1704130812Smarcel unsigned int has_context_table: 1; /* space contains a $CTXT$ subspace for context/inline table. */ 1705130812Smarcel unsigned int has_lines_table: 1; /* space contains a $LINES$ subspace for line tables. */ 1706130812Smarcel unsigned int has_lt_offset_map: 1; /* space contains an lt_offset subspace for line table mapping. */ 1707130812Smarcel 1708130812Smarcel long gntt_length; /* same as old header */ 1709130812Smarcel long lntt_length; /* same as old header */ 1710130812Smarcel long slt_length; /* same as old header */ 1711130812Smarcel long vt_length; /* same as old header */ 1712130812Smarcel long xt_length; /* same as old header */ 1713130812Smarcel long ctxt_length; /* present only if version >= 2 */ 1714130812Smarcel long range_length; /* present only if version >= 2 */ 1715130812Smarcel long expr_length; /* present only if version >= 2 */ 1716130812Smarcel 1717130812Smarcel} DOC_info_header; 1718130812Smarcel 1719130812Smarceltypedef union GenericDebugHeader_union 1720130812Smarcel{ 1721130812Smarcel PXDB_header no_doc; 1722130812Smarcel DOC_info_PXDB_header doc; 1723130812Smarcel XDB_header no_pxdb_no_doc; 1724130812Smarcel DOC_info_header no_pxdb_doc; 1725130812Smarcel} GenericDebugHeader; 1726130812Smarcel 1727130812Smarcel 1728130812Smarcel/* Procedure Descriptor: 1729130812Smarcel An element of the procedure quick look-up table. */ 1730130812Smarcel 1731130812Smarceltypedef struct quick_procedure 1732130812Smarcel{ 1733130812Smarcel long isym; /* 0-based index of first symbol 1734130812Smarcel for procedure in $LNTT$, 1735130812Smarcel i.e. the procedure itself. */ 1736130812Smarcel CORE_ADDR adrStart; /* memory adr of start of proc */ 1737130812Smarcel CORE_ADDR adrEnd; /* memory adr of end of proc */ 1738130812Smarcel char *sbAlias; /* alias name of procedure */ 1739130812Smarcel char *sbProc; /* real name of procedure */ 1740130812Smarcel CORE_ADDR adrBp; /* address of entry breakpoint */ 1741130812Smarcel CORE_ADDR adrExitBp; /* address of exit breakpoint */ 1742130812Smarcel int icd; /* member of this class (index) */ 1743130812Smarcel unsigned int ipd; /* index of template for this */ 1744130812Smarcel /* function (index) */ 1745130812Smarcel unsigned int unused: 5; 1746130812Smarcel unsigned int no_lt_offset: 1;/* no entry in lt_offset table */ 1747130812Smarcel unsigned int fTemplate: 1; /* function template */ 1748130812Smarcel unsigned int fExpansion: 1; /* function expansion */ 1749130812Smarcel unsigned int linked : 1; /* linked with other expansions */ 1750130812Smarcel unsigned int duplicate: 1; /* clone of another procedure */ 1751130812Smarcel unsigned int overloaded:1; /* overloaded function */ 1752130812Smarcel unsigned int member: 1; /* class member function */ 1753130812Smarcel unsigned int constructor:1; /* constructor function */ 1754130812Smarcel unsigned int destructor:1; /* destructor function */ 1755130812Smarcel unsigned int Static: 1; /* static function */ 1756130812Smarcel unsigned int Virtual: 1; /* virtual function */ 1757130812Smarcel unsigned int constant: 1; /* constant function */ 1758130812Smarcel unsigned int pure: 1; /* pure (virtual) function */ 1759130812Smarcel unsigned int language: 4; /* procedure's language */ 1760130812Smarcel unsigned int inlined: 1; /* function has been inlined */ 1761130812Smarcel unsigned int Operator: 1; /* operator function */ 1762130812Smarcel unsigned int stub: 1; /* bodyless function */ 1763130812Smarcel unsigned int optimize: 2; /* optimization level */ 1764130812Smarcel unsigned int level: 5; /* nesting level (top=0) */ 1765130812Smarcel} quick_procedure_entry, *quick_procedure_entry_ptr; 1766130812Smarcel 1767130812Smarcel/* Source File Descriptor: 1768130812Smarcel An element of the source file quick look-up table. */ 1769130812Smarcel 1770130812Smarceltypedef struct quick_source 1771130812Smarcel{ 1772130812Smarcel long isym; /* 0-based index in $LNTT$ of 1773130812Smarcel first symbol for this file. */ 1774130812Smarcel CORE_ADDR adrStart; /* mem adr of start of file's code */ 1775130812Smarcel CORE_ADDR adrEnd; /* mem adr of end of file's code */ 1776130812Smarcel char *sbFile; /* name of source file */ 1777130812Smarcel unsigned int fHasDecl: 1; /* do we have a .d file? */ 1778130812Smarcel unsigned int fWarned: 1; /* have warned about age problems? */ 1779130812Smarcel unsigned int fSrcfile: 1; /* 0 => include 1=> source */ 1780130812Smarcel unsigned short ilnMac; /* lines in file (0 if don't know) */ 1781130812Smarcel int ipd; /* 0-based index of first procedure 1782130812Smarcel in this file, in the quick 1783130812Smarcel look-up table of procedures. */ 1784130812Smarcel unsigned int *rgLn; /* line pointer array, if any */ 1785130812Smarcel} quick_file_entry, *quick_file_entry_ptr; 1786130812Smarcel 1787130812Smarcel/* Module Descriptor: 1788130812Smarcel An element of the module quick reference table. */ 1789130812Smarcel 1790130812Smarceltypedef struct quick_module 1791130812Smarcel{ 1792130812Smarcel long isym; /* 0-based index of first 1793130812Smarcel symbol for module. */ 1794130812Smarcel CORE_ADDR adrStart; /* adr of start of mod. */ 1795130812Smarcel CORE_ADDR adrEnd; /* adr of end of mod. */ 1796130812Smarcel char *sbAlias; /* alias name of module */ 1797130812Smarcel char *sbMod; /* real name of module */ 1798130812Smarcel unsigned int imports: 1; /* module have any imports? */ 1799130812Smarcel unsigned int vars_in_front: 1; /* module globals in front? */ 1800130812Smarcel unsigned int vars_in_gaps: 1; /* module globals in gaps? */ 1801130812Smarcel unsigned int language: 4; /* type of language */ 1802130812Smarcel unsigned int unused : 25; 1803130812Smarcel unsigned int unused2; /* space for future stuff */ 1804130812Smarcel} quick_module_entry, *quick_module_entry_ptr; 1805130812Smarcel 1806130812Smarcel/* Auxiliary Procedure Descriptor: 1807130812Smarcel An element of the auxiliary procedure quick look-up table. */ 1808130812Smarcel 1809130812Smarceltypedef struct quick_aux_procedure 1810130812Smarcel{ 1811130812Smarcel long isym_inln; /* start on inline list for proc */ 1812130812Smarcel long spare; 1813130812Smarcel} quick_aux_procedure_entry, *quick_aux_procedure_entry_ptr; 1814130812Smarcel 1815130812Smarcel/* Paragraph Descriptor: 1816130812Smarcel An element of the paragraph quick look-up table. */ 1817130812Smarcel 1818130812Smarceltypedef struct quick_paragraph 1819130812Smarcel{ 1820130812Smarcel long isym; /* first symbol for label (index) */ 1821130812Smarcel CORE_ADDR adrStart; /* memory adr of start of label */ 1822130812Smarcel CORE_ADDR adrEnd; /* memory adr of end of label */ 1823130812Smarcel char *sbLab; /* name of label */ 1824130812Smarcel unsigned int inst; /* Used in xdb to store inst @ bp */ 1825130812Smarcel unsigned int sect: 1; /* true = section, false = parag. */ 1826130812Smarcel unsigned int unused: 31; /* future use */ 1827130812Smarcel} quick_paragraph_entry, *quick_paragraph_entry_ptr; 1828130812Smarcel 1829130812Smarcel/* Class Descriptor: 1830130812Smarcel An element of the class quick look-up table. */ 1831130812Smarcel 1832130812Smarceltypedef struct quick_class 1833130812Smarcel{ 1834130812Smarcel char *sbClass; /* name of class */ 1835130812Smarcel long isym; /* class symbol (tag) */ 1836130812Smarcel unsigned int type : 2; /* 0=class, 1=union, 2=struct */ 1837130812Smarcel unsigned int fTemplate : 1;/* class template */ 1838130812Smarcel unsigned int expansion : 1;/* template expansion */ 1839130812Smarcel unsigned int unused :28; 1840130812Smarcel sltpointer lowscope; /* beginning of defined scope */ 1841130812Smarcel sltpointer hiscope; /* end of defined scope */ 1842130812Smarcel} quick_class_entry, *quick_class_entry_ptr; 1843130812Smarcel 1844130812Smarcel/* Address Alias Entry 1845130812Smarcel An element of the address alias quick look-up table. */ 1846130812Smarcel 1847130812Smarceltypedef struct quick_alias 1848130812Smarcel{ 1849130812Smarcel CORE_ADDR low; 1850130812Smarcel CORE_ADDR high; 1851130812Smarcel int index; 1852130812Smarcel unsigned int unused : 31; 1853130812Smarcel unsigned int alternate : 1; /* alternate unnamed aliases? */ 1854130812Smarcel} quick_alias_entry, *quick_alias_entry_ptr; 1855130812Smarcel 1856130812Smarcel/* Object Identification Entry 1857130812Smarcel An element of the object identification quick look-up table. */ 1858130812Smarcel 1859130812Smarceltypedef struct quick_obj_ID 1860130812Smarcel{ 1861130812Smarcel CORE_ADDR obj_ident; /* class identifier */ 1862130812Smarcel long isym; /* class symbol */ 1863130812Smarcel long offset; /* offset to object start */ 1864130812Smarcel} quick_obj_ID_entry, *quick_obj_ID_entry_ptr; 1865130812Smarcel 1866130812Smarcel#endif /* HP_SYMTAB_INCLUDED */ 1867