tools/elf4rom/libs/dwarf-20071209/libdwarf/dwarf_base_types.h
changeset 34 92d87f2e53c2
equal deleted inserted replaced
33:1af5c1be89f8 34:92d87f2e53c2
       
     1 /*
       
     2 
       
     3   Copyright (C) 2000,2005 Silicon Graphics, Inc.  All Rights Reserved.
       
     4 
       
     5   This program is free software; you can redistribute it and/or modify it
       
     6   under the terms of version 2.1 of the GNU Lesser General Public License 
       
     7   as published by the Free Software Foundation.
       
     8 
       
     9   This program is distributed in the hope that it would be useful, but
       
    10   WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
       
    12 
       
    13   Further, this software is distributed without any warranty that it is
       
    14   free of the rightful claim of any third person regarding infringement 
       
    15   or the like.  Any license provided herein, whether implied or 
       
    16   otherwise, applies only to this software file.  Patent licenses, if
       
    17   any, provided herein do not apply to combinations of this program with 
       
    18   other software, or any other product whatsoever.  
       
    19 
       
    20   You should have received a copy of the GNU Lesser General Public
       
    21   License along with this program; if not, write the Free Software
       
    22   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
       
    23   USA.
       
    24 
       
    25   Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
       
    26   Mountain View, CA 94043, or:
       
    27 
       
    28   http://www.sgi.com
       
    29 
       
    30   For further information regarding this notice, see:
       
    31 
       
    32   http://oss.sgi.com/projects/GenInfo/NoticeExplan
       
    33 
       
    34 */
       
    35 
       
    36 
       
    37 
       
    38 #include "libdwarfdefs.h"
       
    39 
       
    40 #define true                    1
       
    41 #define false                   0
       
    42 
       
    43 /* to identify a cie */
       
    44 #define DW_CIE_ID 		~(0x0)
       
    45 #define DW_CIE_VERSION		1 /* DWARF2 */
       
    46 #define DW_CIE_VERSION3		3 /* DWARF3 */
       
    47 #define ABBREV_HASH_TABLE_SIZE	10
       
    48 
       
    49 
       
    50 /* 
       
    51     These are allocation type codes for structs that
       
    52     are internal to the Libdwarf Consumer library.
       
    53 */
       
    54 #define DW_DLA_ABBREV_LIST	DW_DLA_ADDR + 1
       
    55 #define DW_DLA_CHAIN		DW_DLA_ADDR + 2
       
    56 #define DW_DLA_CU_CONTEXT	DW_DLA_ADDR + 3
       
    57 #define DW_DLA_FRAME		DW_DLA_ADDR + 4
       
    58 #define DW_DLA_GLOBAL_CONTEXT	DW_DLA_ADDR + 5
       
    59 #define DW_DLA_FILE_ENTRY	DW_DLA_ADDR + 6
       
    60 #define DW_DLA_LINE_CONTEXT	DW_DLA_ADDR + 7
       
    61 #define DW_DLA_LOC_CHAIN	DW_DLA_ADDR + 8
       
    62 #define DW_DLA_HASH_TABLE	DW_DLA_ADDR + 9
       
    63 #define DW_DLA_FUNC_CONTEXT	DW_DLA_ADDR + 10
       
    64 #define DW_DLA_TYPENAME_CONTEXT	DW_DLA_ADDR + 11
       
    65 #define DW_DLA_VAR_CONTEXT	DW_DLA_ADDR + 12
       
    66 #define DW_DLA_WEAK_CONTEXT	DW_DLA_ADDR + 13
       
    67 #define DW_DLA_PUBTYPES_CONTEXT	DW_DLA_ADDR + 14 /* DWARF3 */
       
    68 
       
    69 /* Maximum number of allocation types for allocation routines. */
       
    70 #define MAX_DW_DLA		DW_DLA_PUBTYPES_CONTEXT
       
    71 
       
    72 /*Dwarf_Word  is unsigned word usable for index, count in memory */
       
    73 /*Dwarf_Sword is   signed word usable for index, count in memory */
       
    74 /* The are 32 or 64 bits depending if 64 bit longs or not, which
       
    75 ** fits the  ILP32 and LP64 models
       
    76 ** These work equally well with ILP64.
       
    77 */
       
    78 
       
    79 typedef unsigned long Dwarf_Word;
       
    80 typedef signed long Dwarf_Sword;
       
    81 
       
    82 typedef signed char Dwarf_Sbyte;
       
    83 typedef unsigned char Dwarf_Ubyte;
       
    84 typedef signed short Dwarf_Shalf;
       
    85 typedef Dwarf_Small *Dwarf_Byte_Ptr;
       
    86 
       
    87 /* these 2 are fixed sizes which must not vary with the
       
    88 ** ILP32/LP64 model. Between these two, stay at 32 bit.
       
    89 */
       
    90 typedef __uint32_t Dwarf_ufixed;
       
    91 typedef __int32_t Dwarf_sfixed;
       
    92 
       
    93 /*
       
    94         In various places the code mistakenly associates
       
    95         forms 8 bytes long with Dwarf_Signed or Dwarf_Unsigned
       
    96 	This is not a very portable assumption.
       
    97         The following should be used instead for 64 bit integers.
       
    98 */
       
    99 typedef __uint64_t Dwarf_ufixed64;
       
   100 typedef __int64_t Dwarf_sfixed64;
       
   101 
       
   102 
       
   103 typedef struct Dwarf_Abbrev_List_s *Dwarf_Abbrev_List;
       
   104 typedef struct Dwarf_File_Entry_s *Dwarf_File_Entry;
       
   105 typedef struct Dwarf_CU_Context_s *Dwarf_CU_Context;
       
   106 typedef struct Dwarf_Hash_Table_s *Dwarf_Hash_Table;
       
   107 
       
   108 
       
   109 typedef struct Dwarf_Alloc_Hdr_s *Dwarf_Alloc_Hdr;