OSDN Git Service

(LibGoblin)
[drdeamon64/drdeamon64.git] / libgoblin / drd64_libgoblin_dwarf_tag_dispatch.h
1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
2
3                          D r . D e a m o n  6 4
4                         for INTEL64(R), AMD64(R)
5         
6    Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
11  1. Redistributions of source code must retain the above copyright notice,
12     this list of conditions and the following disclaimer.
13  2. Redistributions in binary form must reproduce the above copyright
14     notice, this list of conditions and the following disclaimer in the
15     documentation and/or other materials provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
30
31 /* File Info -----------------------------------------------------------
32 File: drd64_.h
33 Function: Header 
34 Comment: 
35 ----------------------------------------------------------------------*/
36
37 #ifndef DRD64_HEADER_LIBGOBLIN_DWARF_TAG_DISPATCH
38 #define DRD64_HEADER_LIBGOBLIN_DWARF_TAG_DISPATCH
39
40 #include"drd64_libgoblin.h"
41
42 #ifdef DRD64_SRC_LIBGOBLIN_DWARF_TAG_DISPATCH
43         #define LIBGOBLIN_DWARF_TAG_DISPATCH_EXTERN
44 #else
45         #define LIBGOBLIN_DWARF_TAG_DISPATCH_EXTERN     extern
46 #endif
47
48 #define LIBGOBLIN_DWARF_TAG_MAX 91
49 #define LIBGOBLIN_DWARF_TAG_DEFAULT_MAX 0x4f
50
51 typedef struct  {
52         DWord   dw_tag;
53         int             (* DWARF_Tag_Proc)(
54                                         DWord dw_tag, LibGoblin_BinaryInfo *p_binfo,
55                                         int i_childlv, LibGoblin_DWARF_Info_Ancestry *p_ancestry,
56                                         LibGoblin_DWARF_Info_CUHeader   *p_cuheader );
57 } DWARF_TagFunction;
58
59
60 LIBGOBLIN_DWARF_TAG_DISPATCH_EXTERN
61         int DWARF_Tag_Dispatch_UnknownTag(
62                         DWord dw_tag,
63                         LibGoblin_BinaryInfo *p_binfo,
64                         int i_childlv,
65                         LibGoblin_DWARF_Info_Ancestry *p_ancestry,
66                         LibGoblin_DWARF_Info_CUHeader   *p_cuheader );
67
68 LIBGOBLIN_DWARF_TAG_DISPATCH_EXTERN
69         int DWARF_Tag_Dispatch(
70                 LibGoblin_BinaryInfo    *p_binfo,
71                 DWARF_AbbrevEntry       *p_abbrev,
72                         int                                             i_childlv, 
73                         LibGoblin_DWARF_Info_Ancestry   *p_ancestry,
74                         LibGoblin_DWARF_Info_CUHeader   *p_cuheader );
75
76 // DW_TAG_file_type (for PASCAL) is TagID unknown.
77
78 #ifdef DRD64_SRC_LIBGOBLIN_DWARF_TAG_DISPATCH
79 DWARF_TagFunction       dwarf_tag[LIBGOBLIN_DWARF_TAG_MAX]      = {
80 { 0x00,                                                 NULL },
81 { DW_TAG_array_type,                    DWARF_Tag_Array_UnImplement },          // 0x01: array
82 { DW_TAG_class_type,                    DWARF_Tag_Class_UnImplement },          // 0x02: class
83 { DW_TAG_entry_point,                   DWARF_Tag_NotClang_UnImplement },       // 0x03: notclang
84 { DW_TAG_enumeration_type,              DWARF_Tag_Array_UnImplement },          // 0x04: array
85 { DW_TAG_formal_parameter,              DWARF_Tag_Parameter_UnImplement },      // 0x05: parameter
86 { 0x06,                                                 NULL },
87 { 0x07,                                                 NULL },
88 { DW_TAG_imported_declaration,  DWARF_Tag_Class_UnImplement },          // 0x08: class
89 { 0x09,                                                 NULL },
90 { DW_TAG_label,                                 DWARF_Tag_Function_UnImplement },       // 0x0a: function
91 { DW_TAG_lexical_block,                 DWARF_Tag_Function_UnImplement },       // 0x0b: function
92 { 0x0c,                                                 NULL },
93 { DW_TAG_member,                                DWARF_Tag_Struct_UnImplement },         // 0x0d: struct
94 { 0x0e,                                                 NULL },
95 { DW_TAG_pointer_type,                  DWARF_Tag_Type_UnImplement },           // 0x0f: type
96
97 { DW_TAG_reference_type,                DWARF_Tag_Type_UnImplement },           // 0x10: type
98 { DW_TAG_compile_unit,                  DWARF_Tag_CompileUnit_compile_unit },// 0x11: compileunit
99 { DW_TAG_string_type,                   DWARF_Tag_NotClang_UnImplement },       // 0x12: notclang
100 { DW_TAG_structure_type,                DWARF_Tag_Struct_UnImplement },         // 0x13: struct
101 { 0x14,                                                 NULL },
102 { DW_TAG_subroutine_type,               DWARF_Tag_Type_UnImplement },           // 0x15: type
103 { DW_TAG_typedef,                               DWARF_Tag_Type_UnImplement },           // 0x16: type
104 { DW_TAG_union_type,                    DWARF_Tag_Struct_UnImplement },         // 0x17: struct
105 { DW_TAG_unspecified_parameters,DWARF_Tag_Parameter_UnImplement },      // 0x18: parameter
106 { DW_TAG_variant,                               DWARF_Tag_Struct_UnImplement },         // 0x19: struct
107 { DW_TAG_common_block,                  DWARF_Tag_NotClang_UnImplement },       // 0x1a: notclang
108 { DW_TAG_common_inclusion,              DWARF_Tag_NotClang_UnImplement },       // 0x1b: notclang
109 { DW_TAG_inheritance,                   DWARF_Tag_Class_UnImplement },          // 0x1c: class
110 { DW_TAG_inlined_subroutine,    DWARF_Tag_Function_UnImplement },       // 0x1d: function
111 { DW_TAG_module,                                DWARF_Tag_NotClang_UnImplement },       // 0x1e: notclang
112 { DW_TAG_ptr_to_member_type,    DWARF_Tag_Type_UnImplement },           // 0x1f: type
113
114 { DW_TAG_set_type,                              DWARF_Tag_NotClang_UnImplement },       // 0x20: notclang
115 { DW_TAG_subrange_type,                 DWARF_Tag_Array_UnImplement },          // 0x21: array
116 { DW_TAG_with_stmt,                             DWARF_Tag_NotClang_UnImplement },       // 0x22: notclang
117 { DW_TAG_access_declaration,    DWARF_Tag_Class_UnImplement },          // 0x23: class
118 { DW_TAG_base_type,                             DWARF_Tag_Type_UnImplement },           // 0x24: type
119 { DW_TAG_catch_block,                   DWARF_Tag_Exception_UnImplement },      // 0x25: exception
120 { DW_TAG_const_type,                    DWARF_Tag_Type_UnImplement },           // 0x26: type
121 { DW_TAG_constant,                              DWARF_Tag_Parameter_UnImplement },      // 0x27: parameter
122 { DW_TAG_enumerator,                    DWARF_Tag_Array_UnImplement },          // 0x28: array
123 { 0x29,                                                 NULL },
124 { DW_TAG_friend,                                DWARF_Tag_Class_UnImplement },          // 0x2a: class
125 { DW_TAG_namelist,                              DWARF_Tag_NotClang_UnImplement },       // 0x2b: notclang
126 { DW_TAG_namelist_item,                 DWARF_Tag_NotClang_UnImplement },       // 0x2c: notclang
127 { DW_TAG_packed_type,                   DWARF_Tag_NotClang_UnImplement },       // 0x2d: notclang
128 { DW_TAG_subprogram,                    DWARF_Tag_Function_UnImplement },       // 0x2e: function
129 { DW_TAG_template_type_parameter,DWARF_Tag_Class_UnImplement },         // 0x2f: class
130                                                                                         // = DW_TAG_template_type_param
131
132 { DW_TAG_template_value_parameter,DWARF_Tag_Class_UnImplement },        // 0x30: class
133                                                                                         // = DW_TAG_template_value_param
134 { DW_TAG_thrown_type,                   DWARF_Tag_Exception_UnImplement },      // 0x31: exception
135 { DW_TAG_try_block,                             DWARF_Tag_Exception_UnImplement },      // 0x32: exception
136 { DW_TAG_variant_part,                  DWARF_Tag_NotClang_UnImplement },       // 0x33: notclang
137 { DW_TAG_variable,                              DWARF_Tag_Parameter_UnImplement },      // 0x34: parameter
138 { DW_TAG_volatile_type,                 DWARF_Tag_Type_UnImplement },           // 0x35: type
139 { DW_TAG_dwarf_procedure,               NULL }, // 0x36
140 { DW_TAG_restrict_type,                 DWARF_Tag_Type_UnImplement },           // 0x37: type
141 { DW_TAG_interface_type,                DWARF_Tag_Class_UnImplement },          // 0x38: class
142 { DW_TAG_namespace,                             DWARF_Tag_Class_UnImplement },          // 0x39: class
143 { DW_TAG_imported_module,               DWARF_Tag_Class_UnImplement },          // 0x3a: class
144 { DW_TAG_unspecified_type,              DWARF_Tag_Type_UnImplement },           // 0x3b: type
145 { DW_TAG_partial_unit,                  DWARF_Tag_CompileUnit_UnImplement},     // 0x3c: compileunit
146 { DW_TAG_imported_unit,                 DWARF_Tag_CompileUnit_UnImplement },// 0x3d: compileunit
147 { 0x3e, NULL },
148 { DW_TAG_condition,                             DWARF_Tag_NotClang_UnImplement },       // 0x3f: notclang
149
150 { DW_TAG_shared_type,                   DWARF_Tag_NotClang_UnImplement },       // 0x40: notclang
151 { DW_TAG_type_unit,                             NULL }, // 0x41
152 { DW_TAG_rvalue_reference_type, NULL }, // 0x42
153 { DW_TAG_template_alias,                NULL }, // 0x43
154 { 0x44,                                                 NULL },
155 { 0x45,                                                 NULL },
156 { 0x46,                                                 NULL },
157 { 0x47,                                                 NULL },
158 { 0x48,                                                 NULL },
159 { 0x49,                                                 NULL },
160 { 0x4a,                                                 NULL },
161 { 0x4b,                                                 NULL },
162 { 0x4c,                                                 NULL },
163 { 0x4d,                                                 NULL },
164 { 0x4e,                                                 NULL },
165 { 0x4f,                                                 NULL },
166
167 // DW_TAG_lo_user 0x4080 ---- 11 items
168 { DW_TAG_format_label, NULL },  // 0x4101
169 { DW_TAG_function_template, NULL },     // 0x4102
170 { DW_TAG_class_template, NULL },        // 0x4103
171 { DW_TAG_GNU_BINCL, NULL },     // 0x4104
172 { DW_TAG_GNU_EINCL, NULL },     // 0x4105
173 { DW_TAG_GNU_template_template_parameter, NULL },       // 0x4106
174 { DW_TAG_GNU_template_template_param, NULL },   // 0x4106
175 { DW_TAG_GNU_template_parameter_pack, NULL },   // 0x4107
176 { DW_TAG_GNU_formal_parameter_pack, NULL },     // 0x4108
177 { DW_TAG_GNU_call_site, NULL }, // 0x4109
178 { DW_TAG_GNU_call_site_parameter, NULL }        // 0x410a
179 // DW_TAG_hi_user 0xffff ----
180 };
181 #else
182 extern  DWARF_TagFunction       dwarf_tag[LIBGOBLIN_DWARF_TAG_MAX];
183 #endif
184
185 #endif  /* DRD64_HEADER_LIBGOBLIN_BINFO */
186
187 /* EOF of drd64_.h ----------------------------------- */