⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hp-symtab.h

📁 基于4个mips核的noc设计
💻 H
📖 第 1 页 / 共 5 页
字号:
/* Definitions and structures for reading debug symbols from the   native HP C compiler.   Written by the Center for Software Science at the University of Utah   and by Cygnus Support.   Copyright 1994, 1995, 1998, 1999 Free Software Foundation, Inc.   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */#ifndef HP_SYMTAB_INCLUDED#define HP_SYMTAB_INCLUDED/* General information:   This header file defines and describes only the data structures   necessary to read debug symbols produced by the HP C compiler,   HP ANSI C++ compiler, and HP FORTRAN 90 compiler using the   SOM object file format.     (For a full description of the debug format, ftp hpux-symtab.h from   jaguar.cs.utah.edu:/dist).      Additional notes (Rich Title)   This file is a reverse-engineered version of a file called   "symtab.h" which exists internal to HP's Computer Languages Organization   in /CLO/Components/DDE/obj/som/symtab.h. Because HP's version of   the file is copyrighted and not distributed, it is necessary for   GDB to use the reverse-engineered version that follows.   Work was done by Cygnus to reverse-engineer the C subset of symtab.h.   The WDB project has extended this to also contain the C++    symbol definitions, the F90 symbol definitions,    and the DOC (debugging-optimized-code) symbol definitions.   In some cases (the C++ symbol definitions)   I have added internal documentation here that   goes beyond what is supplied in HP's symtab.h. If we someday   unify these files again, the extra comments should be merged back   into HP's symtab.h.     -------------------------------------------------------------------   Debug symbols are contained entirely within an unloadable space called   $DEBUG$.  $DEBUG$ contains several subspaces which group related   debug symbols.   $GNTT$ contains information for global variables, types and contants.   $LNTT$ contains information for procedures (including nesting), scoping   information, local variables, types, and constants.   $SLT$ contains source line information so that code addresses may be   mapped to source lines.   $VT$ contains various strings and constants for named objects (variables,   typedefs, functions, etc).  Strings are stored as null-terminated character   lists.  Constants always begin on word boundaries.  The first byte of   the VT must be zero (a null string).   $XT$ is not currently used by GDB.   Many structures within the subspaces point to other structures within   the same subspace, or to structures within a different subspace.  These   pointers are represented as a structure index from the beginning of   the appropriate subspace.  *//* Used to describe where a constant is stored.  */enum location_type{  LOCATION_IMMEDIATE,  LOCATION_PTR,  LOCATION_VT,};/* Languages supported by this debug format.  Within the data structures   this type is limited to 4 bits for a maximum of 16 languages.  */enum hp_language{  HP_LANGUAGE_UNKNOWN,  HP_LANGUAGE_C,  HP_LANGUAGE_FORTRAN,  HP_LANGUAGE_F77 = HP_LANGUAGE_FORTRAN,  HP_LANGUAGE_PASCAL,  HP_LANGUAGE_MODCAL,  HP_LANGUAGE_COBOL,  HP_LANGUAGE_BASIC,  HP_LANGUAGE_ADA,  HP_LANGUAGE_CPLUSPLUS,  HP_LANGUAGE_DMPASCAL};/* Basic data types available in this debug format.  Within the data   structures this type is limited to 5 bits for a maximum of 32 basic   data types.  */enum hp_type{  HP_TYPE_UNDEFINED, /* 0 */  HP_TYPE_BOOLEAN, /* 1 */  HP_TYPE_CHAR, /* 2 */  HP_TYPE_INT, /* 3 */  HP_TYPE_UNSIGNED_INT, /* 4 */  HP_TYPE_REAL, /* 5 */  HP_TYPE_COMPLEX, /* 6 */  HP_TYPE_STRING200, /* 7 */  HP_TYPE_LONGSTRING200, /* 8 */  HP_TYPE_TEXT, /* 9 */  HP_TYPE_FLABEL, /* 10 */  HP_TYPE_FTN_STRING_SPEC, /* 11 */  HP_TYPE_MOD_STRING_SPEC, /* 12 */  HP_TYPE_PACKED_DECIMAL, /* 13 */  HP_TYPE_REAL_3000, /* 14 */  HP_TYPE_MOD_STRING_3000, /* 15 */  HP_TYPE_ANYPOINTER, /* 16 */  HP_TYPE_GLOBAL_ANYPOINTER, /* 17 */  HP_TYPE_LOCAL_ANYPOINTER, /* 18 */  HP_TYPE_COMPLEXS3000, /* 19 */  HP_TYPE_FTN_STRING_S300_COMPAT, /* 20 */   HP_TYPE_FTN_STRING_VAX_COMPAT, /* 21 */  HP_TYPE_BOOLEAN_S300_COMPAT, /* 22 */  HP_TYPE_BOOLEAN_VAX_COMPAT, /* 23 */  HP_TYPE_WIDE_CHAR, /* 24 */  HP_TYPE_LONG, /* 25 */  HP_TYPE_UNSIGNED_LONG, /* 26 */  HP_TYPE_DOUBLE, /* 27 */  HP_TYPE_TEMPLATE_ARG, /* 28 */  HP_TYPE_VOID /* 29 */};/* An immediate name and type table entry.   extension and immediate will always be one.   global will always be zero.   hp_type is the basic type this entry describes.   bitlength is the length in bits for the basic type.  */struct dnttp_immediate{  unsigned int extension:	1;  unsigned int immediate:	1;  unsigned int global:		1;  unsigned int type: 		5;  unsigned int bitlength:	24;};/* A nonimmediate name and type table entry.   extension will always be one.   immediate will always be zero.   if global is zero, this entry points into the LNTT   if global is one, this entry points into the GNTT   index is the index within the GNTT or LNTT for this entry.  */struct dnttp_nonimmediate{  unsigned int extension:	1;  unsigned int immediate:	1;  unsigned int global:		1;  unsigned int index:		29;};/* A pointer to an entry in the GNTT and LNTT tables.  It has two   forms depending on the type being described.   The immediate form is used for simple entries and is one   word.   The nonimmediate form is used for complex entries and contains   an index into the LNTT or GNTT which describes the entire type.   If a dnttpointer is -1, then it is a NIL entry.  */#define DNTTNIL (-1)typedef union dnttpointer{  struct dnttp_immediate    dntti;  struct dnttp_nonimmediate dnttp;  int word;} dnttpointer;/* An index into the source line table.  As with dnttpointers, a sltpointer   of -1 indicates a NIL entry.  */#define SLTNIL (-1)typedef int sltpointer;/* Index into DOC (= "Debugging Optimized Code") line table */#define LTNIL (-1)typedef int ltpointer;/* Index into context table */#define CTXTNIL (-1)typedef int ctxtpointer;/* Unsigned byte offset into the VT.  */typedef unsigned int vtpointer;/* A DNTT entry (used within the GNTT and LNTT).   DNTT entries are variable sized objects, but are always a multiple   of 3 words (we call each group of 3 words a "block").   The first bit in each block is an extension bit.  This bit is zero   for the first block of a DNTT entry.  If the entry requires more   than one block, then this bit is set to one in all blocks after   the first one.  *//* Each DNTT entry describes a particular debug symbol (beginning of   a source file, a function, variables, structures, etc.   The type of the DNTT entry is stored in the "kind" field within the   DNTT entry itself.  */enum dntt_entry_type{  DNTT_TYPE_NIL = -1,  DNTT_TYPE_SRCFILE,  DNTT_TYPE_MODULE,  DNTT_TYPE_FUNCTION,  DNTT_TYPE_ENTRY,  DNTT_TYPE_BEGIN,  DNTT_TYPE_END,  DNTT_TYPE_IMPORT,  DNTT_TYPE_LABEL,  DNTT_TYPE_FPARAM,  DNTT_TYPE_SVAR,  DNTT_TYPE_DVAR,  DNTT_TYPE_HOLE1,  DNTT_TYPE_CONST,  DNTT_TYPE_TYPEDEF,  DNTT_TYPE_TAGDEF,  DNTT_TYPE_POINTER,  DNTT_TYPE_ENUM,  DNTT_TYPE_MEMENUM,  DNTT_TYPE_SET,  DNTT_TYPE_SUBRANGE,  DNTT_TYPE_ARRAY,  DNTT_TYPE_STRUCT,  DNTT_TYPE_UNION,  DNTT_TYPE_FIELD,  DNTT_TYPE_VARIANT,  DNTT_TYPE_FILE,  DNTT_TYPE_FUNCTYPE,  DNTT_TYPE_WITH,  DNTT_TYPE_COMMON,  DNTT_TYPE_COBSTRUCT,  DNTT_TYPE_XREF,  DNTT_TYPE_SA,  DNTT_TYPE_MACRO,  DNTT_TYPE_BLOCKDATA,  DNTT_TYPE_CLASS_SCOPE,  DNTT_TYPE_REFERENCE,  DNTT_TYPE_PTRMEM,  DNTT_TYPE_PTRMEMFUNC,  DNTT_TYPE_CLASS,  DNTT_TYPE_GENFIELD,  DNTT_TYPE_VFUNC,  DNTT_TYPE_MEMACCESS,  DNTT_TYPE_INHERITANCE,  DNTT_TYPE_FRIEND_CLASS,  DNTT_TYPE_FRIEND_FUNC,  DNTT_TYPE_MODIFIER,  DNTT_TYPE_OBJECT_ID,  DNTT_TYPE_MEMFUNC,  DNTT_TYPE_TEMPLATE,  DNTT_TYPE_TEMPLATE_ARG,  DNTT_TYPE_FUNC_TEMPLATE,  DNTT_TYPE_LINK,  DNTT_TYPE_DYN_ARRAY_DESC,  DNTT_TYPE_DESC_SUBRANGE,  DNTT_TYPE_BEGIN_EXT,  DNTT_TYPE_INLN,  DNTT_TYPE_INLN_LIST,  DNTT_TYPE_ALIAS,  DNTT_TYPE_DOC_FUNCTION,  DNTT_TYPE_DOC_MEMFUNC,  DNTT_TYPE_MAX};/* DNTT_TYPE_SRCFILE:   One DNTT_TYPE_SRCFILE symbol is output for the start of each source   file and at the begin and end of an included file.  A DNTT_TYPE_SRCFILE   entry is also output before each DNTT_TYPE_FUNC symbol so that debuggers   can determine what file a function was defined in.   LANGUAGE describes the source file's language.   NAME points to an VT entry providing the source file's name.   Note the name used for DNTT_TYPE_SRCFILE entries are exactly as seen   by the compiler (ie they may be relative or absolute).  C include files   via <> inclusion must use absolute paths.   ADDRESS points to an SLT entry from which line number and code locations   may be determined.  */struct dntt_type_srcfile{  unsigned int extension:	1;  unsigned int kind:		10;    /* DNTT_TYPE_SRCFILE */  unsigned int language:	4;  unsigned int unused:		17;  vtpointer name;  sltpointer address;};/* DNTT_TYPE_MODULE:   A DNTT_TYPE_MODULE symbol is emitted for the start of a pascal   module or C source file. A module indicates a compilation unit   for name-scoping purposes; in that regard there should be    a 1-1 correspondence between GDB "symtab"'s and MODULE symbol records.   Each DNTT_TYPE_MODULE must have an associated DNTT_TYPE_END symbol.   NAME points to a VT entry providing the module's name.  Note C   source files are considered nameless modules.   ALIAS point to a VT entry providing a secondary name.   ADDRESS points to an SLT entry from which line number and code locations   may be determined.  */struct dntt_type_module{  unsigned int extension:	1;  unsigned int kind:		10; 	/* DNTT_TYPE_MODULE */  unsigned int unused:		21;  vtpointer name;  vtpointer alias;  dnttpointer unused2;  sltpointer address;};/* DNTT_TYPE_FUNCTION,   DNTT_TYPE_ENTRY,   DNTT_TYPE_BLOCKDATA,   DNTT_TYPE_MEMFUNC:   A DNTT_TYPE_FUNCTION symbol is emitted for each function definition;   a DNTT_TYPE_ENTRY symbols is used for secondary entry points.  Both   symbols used the dntt_type_function structure.   A DNTT_TYPE_BLOCKDATA symbol is emitted ...?   A DNTT_TYPE_MEMFUNC symbol is emitted for inlined member functions (C++).    Each of DNTT_TYPE_FUNCTION must have a matching DNTT_TYPE_END.   GLOBAL is nonzero if the function has global scope.   LANGUAGE describes the function's source language.   OPT_LEVEL describes the optimization level the function was compiled   with.   VARARGS is nonzero if the function uses varargs.   NAME points to a VT entry providing the function's name.   ALIAS points to a VT entry providing a secondary name for the function.   FIRSTPARAM points to a LNTT entry which describes the parameter list.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -