1 | /** @file
|
---|
2 | * IPRT - DWARF constants.
|
---|
3 | *
|
---|
4 | * @note dwarf.mac is generated from this file by running 'kmk incs' in the root.
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2006-2020 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | *
|
---|
18 | * The contents of this file may alternatively be used under the terms
|
---|
19 | * of the Common Development and Distribution License Version 1.0
|
---|
20 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
21 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
22 | * CDDL are applicable instead of those of the GPL.
|
---|
23 | *
|
---|
24 | * You may elect to license modified versions of this file under the
|
---|
25 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef IPRT_INCLUDED_formats_dwarf_h
|
---|
29 | #define IPRT_INCLUDED_formats_dwarf_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 |
|
---|
35 | /** @name Standard DWARF Line Number Opcodes
|
---|
36 | * @{ */
|
---|
37 | #define DW_LNS_extended UINT8_C(0x00)
|
---|
38 | #define DW_LNS_copy UINT8_C(0x01)
|
---|
39 | #define DW_LNS_advance_pc UINT8_C(0x02)
|
---|
40 | #define DW_LNS_advance_line UINT8_C(0x03)
|
---|
41 | #define DW_LNS_set_file UINT8_C(0x04)
|
---|
42 | #define DW_LNS_set_column UINT8_C(0x05)
|
---|
43 | #define DW_LNS_negate_stmt UINT8_C(0x06)
|
---|
44 | #define DW_LNS_set_basic_block UINT8_C(0x07)
|
---|
45 | #define DW_LNS_const_add_pc UINT8_C(0x08)
|
---|
46 | #define DW_LNS_fixed_advance_pc UINT8_C(0x09)
|
---|
47 | #define DW_LNS_set_prologue_end UINT8_C(0x0a)
|
---|
48 | #define DW_LNS_set_epilogue_begin UINT8_C(0x0b)
|
---|
49 | #define DW_LNS_set_isa UINT8_C(0x0c)
|
---|
50 | #define DW_LNS_what_question_mark UINT8_C(0x0d)
|
---|
51 | /** @} */
|
---|
52 |
|
---|
53 |
|
---|
54 | /** @name Extended DWARF Line Number Opcodes
|
---|
55 | * @{ */
|
---|
56 | #define DW_LNE_end_sequence UINT8_C(1)
|
---|
57 | #define DW_LNE_set_address UINT8_C(2)
|
---|
58 | #define DW_LNE_define_file UINT8_C(3)
|
---|
59 | #define DW_LNE_set_descriminator UINT8_C(4)
|
---|
60 | /** @} */
|
---|
61 |
|
---|
62 |
|
---|
63 | /** @name DIE Tags.
|
---|
64 | * @{ */
|
---|
65 | #define DW_TAG_array_type UINT16_C(0x0001)
|
---|
66 | #define DW_TAG_class_type UINT16_C(0x0002)
|
---|
67 | #define DW_TAG_entry_point UINT16_C(0x0003)
|
---|
68 | #define DW_TAG_enumeration_type UINT16_C(0x0004)
|
---|
69 | #define DW_TAG_formal_parameter UINT16_C(0x0005)
|
---|
70 | #define DW_TAG_imported_declaration UINT16_C(0x0008)
|
---|
71 | #define DW_TAG_label UINT16_C(0x000a)
|
---|
72 | #define DW_TAG_lexical_block UINT16_C(0x000b)
|
---|
73 | #define DW_TAG_member UINT16_C(0x000d)
|
---|
74 | #define DW_TAG_pointer_type UINT16_C(0x000f)
|
---|
75 | #define DW_TAG_reference_type UINT16_C(0x0010)
|
---|
76 | #define DW_TAG_compile_unit UINT16_C(0x0011)
|
---|
77 | #define DW_TAG_string_type UINT16_C(0x0012)
|
---|
78 | #define DW_TAG_structure_type UINT16_C(0x0013)
|
---|
79 | #define DW_TAG_subroutine_type UINT16_C(0x0015)
|
---|
80 | #define DW_TAG_typedef UINT16_C(0x0016)
|
---|
81 | #define DW_TAG_union_type UINT16_C(0x0017)
|
---|
82 | #define DW_TAG_unspecified_parameters UINT16_C(0x0018)
|
---|
83 | #define DW_TAG_variant UINT16_C(0x0019)
|
---|
84 | #define DW_TAG_common_block UINT16_C(0x001a)
|
---|
85 | #define DW_TAG_common_inclusion UINT16_C(0x001b)
|
---|
86 | #define DW_TAG_inheritance UINT16_C(0x001c)
|
---|
87 | #define DW_TAG_inlined_subroutine UINT16_C(0x001d)
|
---|
88 | #define DW_TAG_module UINT16_C(0x001e)
|
---|
89 | #define DW_TAG_ptr_to_member_type UINT16_C(0x001f)
|
---|
90 | #define DW_TAG_set_type UINT16_C(0x0020)
|
---|
91 | #define DW_TAG_subrange_type UINT16_C(0x0021)
|
---|
92 | #define DW_TAG_with_stmt UINT16_C(0x0022)
|
---|
93 | #define DW_TAG_access_declaration UINT16_C(0x0023)
|
---|
94 | #define DW_TAG_base_type UINT16_C(0x0024)
|
---|
95 | #define DW_TAG_catch_block UINT16_C(0x0025)
|
---|
96 | #define DW_TAG_const_type UINT16_C(0x0026)
|
---|
97 | #define DW_TAG_constant UINT16_C(0x0027)
|
---|
98 | #define DW_TAG_enumerator UINT16_C(0x0028)
|
---|
99 | #define DW_TAG_file_type UINT16_C(0x0029)
|
---|
100 | #define DW_TAG_friend UINT16_C(0x002a)
|
---|
101 | #define DW_TAG_namelist UINT16_C(0x002b)
|
---|
102 | #define DW_TAG_namelist_item UINT16_C(0x002c)
|
---|
103 | #define DW_TAG_packed_type UINT16_C(0x002d)
|
---|
104 | #define DW_TAG_subprogram UINT16_C(0x002e)
|
---|
105 | #define DW_TAG_template_type_parameter UINT16_C(0x002f)
|
---|
106 | #define DW_TAG_template_value_parameter UINT16_C(0x0030)
|
---|
107 | #define DW_TAG_thrown_type UINT16_C(0x0031)
|
---|
108 | #define DW_TAG_try_block UINT16_C(0x0032)
|
---|
109 | #define DW_TAG_variant_part UINT16_C(0x0033)
|
---|
110 | #define DW_TAG_variable UINT16_C(0x0034)
|
---|
111 | #define DW_TAG_volatile_type UINT16_C(0x0035)
|
---|
112 | #define DW_TAG_dwarf_procedure UINT16_C(0x0036)
|
---|
113 | #define DW_TAG_restrict_type UINT16_C(0x0037)
|
---|
114 | #define DW_TAG_interface_type UINT16_C(0x0038)
|
---|
115 | #define DW_TAG_namespace UINT16_C(0x0039)
|
---|
116 | #define DW_TAG_imported_module UINT16_C(0x003a)
|
---|
117 | #define DW_TAG_unspecified_type UINT16_C(0x003b)
|
---|
118 | #define DW_TAG_partial_unit UINT16_C(0x003c)
|
---|
119 | #define DW_TAG_imported_unit UINT16_C(0x003d)
|
---|
120 | #define DW_TAG_condition UINT16_C(0x003f)
|
---|
121 | #define DW_TAG_shared_type UINT16_C(0x0040)
|
---|
122 | #define DW_TAG_type_unit UINT16_C(0x0041)
|
---|
123 | #define DW_TAG_rvalue_reference_type UINT16_C(0x0042)
|
---|
124 | #define DW_TAG_template_alias UINT16_C(0x0043)
|
---|
125 | #define DW_TAG_lo_user UINT16_C(0x4080)
|
---|
126 | #define DW_TAG_GNU_call_site UINT16_C(0x4109)
|
---|
127 | #define DW_TAG_GNU_call_site_parameter UINT16_C(0x410a)
|
---|
128 | #define DW_TAG_WATCOM_address_class_type UINT16_C(0x4100) /**< Watcom extension. */
|
---|
129 | #define DW_TAG_WATCOM_namespace UINT16_C(0x4101) /**< Watcom extension. */
|
---|
130 | #define DW_TAG_hi_user UINT16_C(0xffff)
|
---|
131 | /** @} */
|
---|
132 |
|
---|
133 |
|
---|
134 | /** @name Has children or not (follows DW_TAG_xxx in .debug_abbrev).
|
---|
135 | * @{ */
|
---|
136 | #define DW_CHILDREN_yes 1
|
---|
137 | #define DW_CHILDREN_no 0
|
---|
138 | /** @} */
|
---|
139 |
|
---|
140 |
|
---|
141 | /** @name DIE Attributes.
|
---|
142 | * @{ */
|
---|
143 | #define DW_AT_sibling UINT16_C(0x0001)
|
---|
144 | #define DW_AT_location UINT16_C(0x0002)
|
---|
145 | #define DW_AT_name UINT16_C(0x0003)
|
---|
146 | #define DW_AT_ordering UINT16_C(0x0009)
|
---|
147 | #define DW_AT_byte_size UINT16_C(0x000b)
|
---|
148 | #define DW_AT_bit_offset UINT16_C(0x000c)
|
---|
149 | #define DW_AT_bit_size UINT16_C(0x000d)
|
---|
150 | #define DW_AT_stmt_list UINT16_C(0x0010)
|
---|
151 | #define DW_AT_low_pc UINT16_C(0x0011)
|
---|
152 | #define DW_AT_high_pc UINT16_C(0x0012)
|
---|
153 | #define DW_AT_language UINT16_C(0x0013)
|
---|
154 | #define DW_AT_discr UINT16_C(0x0015)
|
---|
155 | #define DW_AT_discr_value UINT16_C(0x0016)
|
---|
156 | #define DW_AT_visibility UINT16_C(0x0017)
|
---|
157 | #define DW_AT_import UINT16_C(0x0018)
|
---|
158 | #define DW_AT_string_length UINT16_C(0x0019)
|
---|
159 | #define DW_AT_common_reference UINT16_C(0x001a)
|
---|
160 | #define DW_AT_comp_dir UINT16_C(0x001b)
|
---|
161 | #define DW_AT_const_value UINT16_C(0x001c)
|
---|
162 | #define DW_AT_containing_type UINT16_C(0x001d)
|
---|
163 | #define DW_AT_default_value UINT16_C(0x001e)
|
---|
164 | #define DW_AT_inline UINT16_C(0x0020)
|
---|
165 | #define DW_AT_is_optional UINT16_C(0x0021)
|
---|
166 | #define DW_AT_lower_bound UINT16_C(0x0022)
|
---|
167 | #define DW_AT_producer UINT16_C(0x0025)
|
---|
168 | #define DW_AT_prototyped UINT16_C(0x0027)
|
---|
169 | #define DW_AT_return_addr UINT16_C(0x002a)
|
---|
170 | #define DW_AT_start_scope UINT16_C(0x002c)
|
---|
171 | #define DW_AT_bit_stride UINT16_C(0x002e)
|
---|
172 | #define DW_AT_upper_bound UINT16_C(0x002f)
|
---|
173 | #define DW_AT_abstract_origin UINT16_C(0x0031)
|
---|
174 | #define DW_AT_accessibility UINT16_C(0x0032)
|
---|
175 | #define DW_AT_address_class UINT16_C(0x0033)
|
---|
176 | #define DW_AT_artificial UINT16_C(0x0034)
|
---|
177 | #define DW_AT_base_types UINT16_C(0x0035)
|
---|
178 | #define DW_AT_calling_convention UINT16_C(0x0036)
|
---|
179 | #define DW_AT_count UINT16_C(0x0037)
|
---|
180 | #define DW_AT_data_member_location UINT16_C(0x0038)
|
---|
181 | #define DW_AT_decl_column UINT16_C(0x0039)
|
---|
182 | #define DW_AT_decl_file UINT16_C(0x003a)
|
---|
183 | #define DW_AT_decl_line UINT16_C(0x003b)
|
---|
184 | #define DW_AT_declaration UINT16_C(0x003c)
|
---|
185 | #define DW_AT_discr_list UINT16_C(0x003d)
|
---|
186 | #define DW_AT_encoding UINT16_C(0x003e)
|
---|
187 | #define DW_AT_external UINT16_C(0x003f)
|
---|
188 | #define DW_AT_frame_base UINT16_C(0x0040)
|
---|
189 | #define DW_AT_friend UINT16_C(0x0041)
|
---|
190 | #define DW_AT_identifier_case UINT16_C(0x0042)
|
---|
191 | #define DW_AT_macro_info UINT16_C(0x0043)
|
---|
192 | #define DW_AT_namelist_item UINT16_C(0x0044)
|
---|
193 | #define DW_AT_priority UINT16_C(0x0045)
|
---|
194 | #define DW_AT_segment UINT16_C(0x0046)
|
---|
195 | #define DW_AT_specification UINT16_C(0x0047)
|
---|
196 | #define DW_AT_static_link UINT16_C(0x0048)
|
---|
197 | #define DW_AT_type UINT16_C(0x0049)
|
---|
198 | #define DW_AT_use_location UINT16_C(0x004a)
|
---|
199 | #define DW_AT_variable_parameter UINT16_C(0x004b)
|
---|
200 | #define DW_AT_virtuality UINT16_C(0x004c)
|
---|
201 | #define DW_AT_vtable_elem_location UINT16_C(0x004d)
|
---|
202 | #define DW_AT_allocated UINT16_C(0x004e)
|
---|
203 | #define DW_AT_associated UINT16_C(0x004f)
|
---|
204 | #define DW_AT_data_location UINT16_C(0x0050)
|
---|
205 | #define DW_AT_byte_stride UINT16_C(0x0051)
|
---|
206 | #define DW_AT_entry_pc UINT16_C(0x0052)
|
---|
207 | #define DW_AT_use_UTF8 UINT16_C(0x0053)
|
---|
208 | #define DW_AT_extension UINT16_C(0x0054)
|
---|
209 | #define DW_AT_ranges UINT16_C(0x0055)
|
---|
210 | #define DW_AT_trampoline UINT16_C(0x0056)
|
---|
211 | #define DW_AT_call_column UINT16_C(0x0057)
|
---|
212 | #define DW_AT_call_file UINT16_C(0x0058)
|
---|
213 | #define DW_AT_call_line UINT16_C(0x0059)
|
---|
214 | #define DW_AT_description UINT16_C(0x005a)
|
---|
215 | #define DW_AT_binary_scale UINT16_C(0x005b)
|
---|
216 | #define DW_AT_decimal_scale UINT16_C(0x005c)
|
---|
217 | #define DW_AT_small UINT16_C(0x005d)
|
---|
218 | #define DW_AT_decimal_sign UINT16_C(0x005e)
|
---|
219 | #define DW_AT_digit_count UINT16_C(0x005f)
|
---|
220 | #define DW_AT_picture_string UINT16_C(0x0060)
|
---|
221 | #define DW_AT_mutable UINT16_C(0x0061)
|
---|
222 | #define DW_AT_threads_scaled UINT16_C(0x0062)
|
---|
223 | #define DW_AT_explicit UINT16_C(0x0063)
|
---|
224 | #define DW_AT_object_pointer UINT16_C(0x0064)
|
---|
225 | #define DW_AT_endianity UINT16_C(0x0065)
|
---|
226 | #define DW_AT_elemental UINT16_C(0x0066)
|
---|
227 | #define DW_AT_pure UINT16_C(0x0067)
|
---|
228 | #define DW_AT_recursive UINT16_C(0x0068)
|
---|
229 | #define DW_AT_signature UINT16_C(0x0069)
|
---|
230 | #define DW_AT_main_subprogram UINT16_C(0x006a)
|
---|
231 | #define DW_AT_data_bit_offset UINT16_C(0x006b)
|
---|
232 | #define DW_AT_const_expr UINT16_C(0x006c)
|
---|
233 | #define DW_AT_enum_class UINT16_C(0x006d)
|
---|
234 | #define DW_AT_linkage_name UINT16_C(0x006e)
|
---|
235 | #define DW_AT_lo_user UINT16_C(0x2000)
|
---|
236 | /** Used by GCC and others, same as DW_AT_linkage_name. See http://wiki.dwarfstd.org/index.php?title=DW_AT_linkage_name*/
|
---|
237 | #define DW_AT_MIPS_linkage_name UINT16_C(0x2007)
|
---|
238 | #define DW_AT_WATCOM_memory_model UINT16_C(0x2082) /**< Watcom extension. */
|
---|
239 | #define DW_AT_WATCOM_references_start UINT16_C(0x2083) /**< Watcom extension. */
|
---|
240 | #define DW_AT_WATCOM_parm_entry UINT16_C(0x2084) /**< Watcom extension. */
|
---|
241 | #define DW_AT_hi_user UINT16_C(0x3fff)
|
---|
242 | /** @} */
|
---|
243 |
|
---|
244 | /** @name DIE Forms.
|
---|
245 | * @{ */
|
---|
246 | #define DW_FORM_addr UINT16_C(0x01)
|
---|
247 | /* 0x02 was FORM_REF in DWARF v1, obsolete now. */
|
---|
248 | #define DW_FORM_block2 UINT16_C(0x03)
|
---|
249 | #define DW_FORM_block4 UINT16_C(0x04)
|
---|
250 | #define DW_FORM_data2 UINT16_C(0x05)
|
---|
251 | #define DW_FORM_data4 UINT16_C(0x06)
|
---|
252 | #define DW_FORM_data8 UINT16_C(0x07)
|
---|
253 | #define DW_FORM_string UINT16_C(0x08)
|
---|
254 | #define DW_FORM_block UINT16_C(0x09)
|
---|
255 | #define DW_FORM_block1 UINT16_C(0x0a)
|
---|
256 | #define DW_FORM_data1 UINT16_C(0x0b)
|
---|
257 | #define DW_FORM_flag UINT16_C(0x0c)
|
---|
258 | #define DW_FORM_sdata UINT16_C(0x0d)
|
---|
259 | #define DW_FORM_strp UINT16_C(0x0e)
|
---|
260 | #define DW_FORM_udata UINT16_C(0x0f)
|
---|
261 | #define DW_FORM_ref_addr UINT16_C(0x10)
|
---|
262 | #define DW_FORM_ref1 UINT16_C(0x11)
|
---|
263 | #define DW_FORM_ref2 UINT16_C(0x12)
|
---|
264 | #define DW_FORM_ref4 UINT16_C(0x13)
|
---|
265 | #define DW_FORM_ref8 UINT16_C(0x14)
|
---|
266 | #define DW_FORM_ref_udata UINT16_C(0x15)
|
---|
267 | #define DW_FORM_indirect UINT16_C(0x16)
|
---|
268 | #define DW_FORM_sec_offset UINT16_C(0x17)
|
---|
269 | #define DW_FORM_exprloc UINT16_C(0x18)
|
---|
270 | #define DW_FORM_flag_present UINT16_C(0x19)
|
---|
271 | #define DW_FORM_ref_sig8 UINT16_C(0x20)
|
---|
272 | /** @} */
|
---|
273 |
|
---|
274 | /** @name Address classes.
|
---|
275 | * @{ */
|
---|
276 | #define DW_ADDR_none UINT8_C(0)
|
---|
277 | #define DW_ADDR_i386_near16 UINT8_C(1)
|
---|
278 | #define DW_ADDR_i386_far16 UINT8_C(2)
|
---|
279 | #define DW_ADDR_i386_huge16 UINT8_C(3)
|
---|
280 | #define DW_ADDR_i386_near32 UINT8_C(4)
|
---|
281 | #define DW_ADDR_i386_far32 UINT8_C(5)
|
---|
282 | /** @} */
|
---|
283 |
|
---|
284 |
|
---|
285 | /** @name Location Expression Opcodes
|
---|
286 | * @{ */
|
---|
287 | #define DW_OP_addr UINT8_C(0x03) /**< 1 operand, a constant address (size target specific). */
|
---|
288 | #define DW_OP_deref UINT8_C(0x06) /**< 0 operands. */
|
---|
289 | #define DW_OP_const1u UINT8_C(0x08) /**< 1 operand, a 1-byte constant. */
|
---|
290 | #define DW_OP_const1s UINT8_C(0x09) /**< 1 operand, a 1-byte constant. */
|
---|
291 | #define DW_OP_const2u UINT8_C(0x0a) /**< 1 operand, a 2-byte constant. */
|
---|
292 | #define DW_OP_const2s UINT8_C(0x0b) /**< 1 operand, a 2-byte constant. */
|
---|
293 | #define DW_OP_const4u UINT8_C(0x0c) /**< 1 operand, a 4-byte constant. */
|
---|
294 | #define DW_OP_const4s UINT8_C(0x0d) /**< 1 operand, a 4-byte constant. */
|
---|
295 | #define DW_OP_const8u UINT8_C(0x0e) /**< 1 operand, a 8-byte constant. */
|
---|
296 | #define DW_OP_const8s UINT8_C(0x0f) /**< 1 operand, a 8-byte constant. */
|
---|
297 | #define DW_OP_constu UINT8_C(0x10) /**< 1 operand, a ULEB128 constant. */
|
---|
298 | #define DW_OP_consts UINT8_C(0x11) /**< 1 operand, a SLEB128 constant. */
|
---|
299 | #define DW_OP_dup UINT8_C(0x12) /**< 0 operands. */
|
---|
300 | #define DW_OP_drop UINT8_C(0x13) /**< 0 operands. */
|
---|
301 | #define DW_OP_over UINT8_C(0x14) /**< 0 operands. */
|
---|
302 | #define DW_OP_pick UINT8_C(0x15) /**< 1 operands, a 1-byte stack index. */
|
---|
303 | #define DW_OP_swap UINT8_C(0x16) /**< 0 operands. */
|
---|
304 | #define DW_OP_rot UINT8_C(0x17) /**< 0 operands. */
|
---|
305 | #define DW_OP_xderef UINT8_C(0x18) /**< 0 operands. */
|
---|
306 | #define DW_OP_abs UINT8_C(0x19) /**< 0 operands. */
|
---|
307 | #define DW_OP_and UINT8_C(0x1a) /**< 0 operands. */
|
---|
308 | #define DW_OP_div UINT8_C(0x1b) /**< 0 operands. */
|
---|
309 | #define DW_OP_minus UINT8_C(0x1c) /**< 0 operands. */
|
---|
310 | #define DW_OP_mod UINT8_C(0x1d) /**< 0 operands. */
|
---|
311 | #define DW_OP_mul UINT8_C(0x1e) /**< 0 operands. */
|
---|
312 | #define DW_OP_neg UINT8_C(0x1f) /**< 0 operands. */
|
---|
313 | #define DW_OP_not UINT8_C(0x20) /**< 0 operands. */
|
---|
314 | #define DW_OP_or UINT8_C(0x21) /**< 0 operands. */
|
---|
315 | #define DW_OP_plus UINT8_C(0x22) /**< 0 operands. */
|
---|
316 | #define DW_OP_plus_uconst UINT8_C(0x23) /**< 1 operands, a ULEB128 addend. */
|
---|
317 | #define DW_OP_shl UINT8_C(0x24) /**< 0 operands. */
|
---|
318 | #define DW_OP_shr UINT8_C(0x25) /**< 0 operands. */
|
---|
319 | #define DW_OP_shra UINT8_C(0x26) /**< 0 operands. */
|
---|
320 | #define DW_OP_xor UINT8_C(0x27) /**< 0 operands. */
|
---|
321 | #define DW_OP_skip UINT8_C(0x2f) /**< 1 signed 2-byte constant. */
|
---|
322 | #define DW_OP_bra UINT8_C(0x28) /**< 1 signed 2-byte constant. */
|
---|
323 | #define DW_OP_eq UINT8_C(0x29) /**< 0 operands. */
|
---|
324 | #define DW_OP_ge UINT8_C(0x2a) /**< 0 operands. */
|
---|
325 | #define DW_OP_gt UINT8_C(0x2b) /**< 0 operands. */
|
---|
326 | #define DW_OP_le UINT8_C(0x2c) /**< 0 operands. */
|
---|
327 | #define DW_OP_lt UINT8_C(0x2d) /**< 0 operands. */
|
---|
328 | #define DW_OP_ne UINT8_C(0x2e) /**< 0 operands. */
|
---|
329 | #define DW_OP_lit0 UINT8_C(0x30) /**< 0 operands - literals 0..31 */
|
---|
330 | #define DW_OP_lit31 UINT8_C(0x4f) /**< last litteral. */
|
---|
331 | #define DW_OP_reg0 UINT8_C(0x50) /**< 0 operands - reg 0..31. */
|
---|
332 | #define DW_OP_reg31 UINT8_C(0x6f) /**< last register. */
|
---|
333 | #define DW_OP_breg0 UINT8_C(0x70) /**< 1 operand, a SLEB128 offset. */
|
---|
334 | #define DW_OP_breg31 UINT8_C(0x8f) /**< last branch register. */
|
---|
335 | #define DW_OP_regx UINT8_C(0x90) /**< 1 operand, a ULEB128 register. */
|
---|
336 | #define DW_OP_fbreg UINT8_C(0x91) /**< 1 operand, a SLEB128 offset. */
|
---|
337 | #define DW_OP_bregx UINT8_C(0x92) /**< 2 operands, a ULEB128 register followed by a SLEB128 offset. */
|
---|
338 | #define DW_OP_piece UINT8_C(0x93) /**< 1 operand, a ULEB128 size of piece addressed. */
|
---|
339 | #define DW_OP_deref_size UINT8_C(0x94) /**< 1 operand, a 1-byte size of data retrieved. */
|
---|
340 | #define DW_OP_xderef_size UINT8_C(0x95) /**< 1 operand, a 1-byte size of data retrieved. */
|
---|
341 | #define DW_OP_nop UINT8_C(0x96) /**< 0 operands. */
|
---|
342 | #define DW_OP_lo_user UINT8_C(0xe0) /**< First user opcode */
|
---|
343 | #define DW_OP_hi_user UINT8_C(0xff) /**< Last user opcode. */
|
---|
344 | /** @} */
|
---|
345 |
|
---|
346 | /** @name Exception Handler Pointer Encodings (GCC/LSB).
|
---|
347 | * @{ */
|
---|
348 | #define DW_EH_PE_FORMAT_MASK UINT8_C(0x0f) /**< Format mask. */
|
---|
349 | #define DW_EH_PE_APPL_MASK UINT8_C(0x70) /**< Application mask. */
|
---|
350 | #define DW_EH_PE_indirect UINT8_C(0x80) /**< Flag: Indirect pointer. */
|
---|
351 | #define DW_EH_PE_omit UINT8_C(0xff) /**< Special value: Omitted. */
|
---|
352 | #define DW_EH_PE_ptr UINT8_C(0x00) /**< Format: pointer sized, unsigned. */
|
---|
353 | #define DW_EH_PE_uleb128 UINT8_C(0x01) /**< Format: unsigned LEB128. */
|
---|
354 | #define DW_EH_PE_udata2 UINT8_C(0x02) /**< Format: unsigned 16-bit. */
|
---|
355 | #define DW_EH_PE_udata4 UINT8_C(0x03) /**< Format: unsigned 32-bit. */
|
---|
356 | #define DW_EH_PE_udata8 UINT8_C(0x04) /**< Format: unsigned 64-bit. */
|
---|
357 | #define DW_EH_PE_sleb128 UINT8_C(0x09) /**< Format: signed LEB128. */
|
---|
358 | #define DW_EH_PE_sdata2 UINT8_C(0x0a) /**< Format: signed 16-bit. */
|
---|
359 | #define DW_EH_PE_sdata4 UINT8_C(0x0b) /**< Format: signed 32-bit. */
|
---|
360 | #define DW_EH_PE_sdata8 UINT8_C(0x0c) /**< Format: signed 64-bit. */
|
---|
361 | #define DW_EH_PE_absptr UINT8_C(0x00) /**< Application: Absolute */
|
---|
362 | #define DW_EH_PE_pcrel UINT8_C(0x10) /**< Application: PC relative, i.e. relative pointer address. */
|
---|
363 | #define DW_EH_PE_textrel UINT8_C(0x20) /**< Application: text section relative. */
|
---|
364 | #define DW_EH_PE_datarel UINT8_C(0x30) /**< Application: data section relative. */
|
---|
365 | #define DW_EH_PE_funcrel UINT8_C(0x40) /**< Application: relative to start of function. */
|
---|
366 | #define DW_EH_PE_aligned UINT8_C(0x50) /**< Application: aligned pointer. */
|
---|
367 | /** @} */
|
---|
368 |
|
---|
369 | /** @name Call frame instructions.
|
---|
370 | * @{ */
|
---|
371 | /** Mask to use to identify DW_CFA_advance_loc, DW_CFA_offset and DW_CFA_restore. */
|
---|
372 | #define DW_CFA_high_bit_mask UINT8_C(0xc0)
|
---|
373 |
|
---|
374 | #define DW_CFA_nop UINT8_C(0x00) /**< No operands. */
|
---|
375 |
|
---|
376 | #define DW_CFA_advance_loc UINT8_C(0x40) /**< low 6 bits: delta to advance. */
|
---|
377 | #define DW_CFA_set_loc UINT8_C(0x01) /**< op1: address. */
|
---|
378 | #define DW_CFA_advance_loc1 UINT8_C(0x02) /**< op1: 1-byte delta. */
|
---|
379 | #define DW_CFA_advance_loc2 UINT8_C(0x03) /**< op1: 2-byte delta. */
|
---|
380 | #define DW_CFA_advance_loc4 UINT8_C(0x04) /**< op1: 4-byte delta. */
|
---|
381 |
|
---|
382 | #define DW_CFA_offset UINT8_C(0x80) /**< low 6 bits: register; op1: ULEB128 offset. */
|
---|
383 | #define DW_CFA_offset_extended UINT8_C(0x05) /**< op1: ULEB128 register; op2: ULEB128 offset. */
|
---|
384 | #define DW_CFA_offset_extended_sf UINT8_C(0x11) /**< op1: ULEB128 register; op2: SLEB128 offset. */
|
---|
385 | #define DW_CFA_restore UINT8_C(0xc0) /**< low 6 bits: register. */
|
---|
386 | #define DW_CFA_restore_extended UINT8_C(0x06) /**< op1: ULEB128 register. */
|
---|
387 | #define DW_CFA_undefined UINT8_C(0x07) /**< op1: ULEB128 register. */
|
---|
388 | #define DW_CFA_same_value UINT8_C(0x08) /**< op1: ULEB128 register. */
|
---|
389 | #define DW_CFA_register UINT8_C(0x09) /**< op1: ULEB128 destination register; op2: ULEB128 source register. */
|
---|
390 | #define DW_CFA_expression UINT8_C(0x10) /**< op1: ULEB128 register; op2: BLOCK. */
|
---|
391 |
|
---|
392 | #define DW_CFA_val_offset UINT8_C(0x14) /**< op1: ULEB128 register; op2: ULEB128. */
|
---|
393 | #define DW_CFA_val_offset_sf UINT8_C(0x15) /**< op1: ULEB128 register; op2: SLEB128. */
|
---|
394 | #define DW_CFA_val_expression UINT8_C(0x16) /**< op1: ULEB128 register; op2: BLOCK. */
|
---|
395 |
|
---|
396 | #define DW_CFA_remember_state UINT8_C(0x0a) /**< No operands. */
|
---|
397 | #define DW_CFA_restore_state UINT8_C(0x0b) /**< No operands. */
|
---|
398 |
|
---|
399 | #define DW_CFA_def_cfa UINT8_C(0x0c) /**< op1: ULEB128 register; op2: ULEB128 offset. */
|
---|
400 | #define DW_CFA_def_cfa_register UINT8_C(0x0d) /**< op1: ULEB128 register. */
|
---|
401 | #define DW_CFA_def_cfa_offset UINT8_C(0x0e) /**< op1: ULEB128 offset. */
|
---|
402 | #define DW_CFA_def_cfa_expression UINT8_C(0x0f) /**< op1: BLOCK. */
|
---|
403 | #define DW_CFA_def_cfa_sf UINT8_C(0x12) /**< op1: ULEB128 register; op2: SLEB128 offset. */
|
---|
404 | #define DW_CFA_def_cfa_offset_sf UINT8_C(0x13) /**< op1: SLEB128 offset. */
|
---|
405 |
|
---|
406 | #define DW_CFA_lo_user UINT8_C(0x1c) /**< User defined operands. */
|
---|
407 | #define DW_CFA_MIPS_advance_loc8 UINT8_C(0x1d) /**< op1: 8-byte delta? */
|
---|
408 | #define DW_CFA_GNU_window_save UINT8_C(0x2d) /**< op1: ??; op2: ?? */
|
---|
409 | #define DW_CFA_GNU_args_size UINT8_C(0x2e) /**< op1: ??; op2: ?? */
|
---|
410 | #define DW_CFA_GNU_negative_offset_extended UINT8_C(0x2f) /**< op1: ??; op2: ?? */
|
---|
411 | #define DW_CFA_hi_user UINT8_C(0x3f) /**< User defined operands. */
|
---|
412 | /** @} */
|
---|
413 |
|
---|
414 |
|
---|
415 | /** @name DWREG_X86_XXX - 386+ register number mappings.
|
---|
416 | * @{ */
|
---|
417 | #define DWREG_X86_EAX 0
|
---|
418 | #define DWREG_X86_ECX 1
|
---|
419 | #define DWREG_X86_EDX 2
|
---|
420 | #define DWREG_X86_EBX 3
|
---|
421 | #define DWREG_X86_ESP 4
|
---|
422 | #define DWREG_X86_EBP 5
|
---|
423 | #define DWREG_X86_ESI 6
|
---|
424 | #define DWREG_X86_EDI 7
|
---|
425 | #define DWREG_X86_RA 8 /* return address (=EIP) */
|
---|
426 | #define DWREG_X86_EFLAGS 9
|
---|
427 | #define DWREG_X86_ST1 11
|
---|
428 | #define DWREG_X86_ST2 12
|
---|
429 | #define DWREG_X86_ST3 13
|
---|
430 | #define DWREG_X86_ST4 14
|
---|
431 | #define DWREG_X86_ST5 15
|
---|
432 | #define DWREG_X86_ST6 16
|
---|
433 | #define DWREG_X86_ST7 17
|
---|
434 | #define DWREG_X86_XMM0 21
|
---|
435 | #define DWREG_X86_XMM1 22
|
---|
436 | #define DWREG_X86_XMM2 23
|
---|
437 | #define DWREG_X86_XMM3 24
|
---|
438 | #define DWREG_X86_XMM4 25
|
---|
439 | #define DWREG_X86_XMM5 26
|
---|
440 | #define DWREG_X86_XMM6 27
|
---|
441 | #define DWREG_X86_XMM7 28
|
---|
442 | #define DWREG_X86_MM0 29
|
---|
443 | #define DWREG_X86_MM1 30
|
---|
444 | #define DWREG_X86_MM2 31
|
---|
445 | #define DWREG_X86_MM3 32
|
---|
446 | #define DWREG_X86_MM4 33
|
---|
447 | #define DWREG_X86_MM5 34
|
---|
448 | #define DWREG_X86_MM6 35
|
---|
449 | #define DWREG_X86_MM7 36
|
---|
450 | #define DWREG_X86_MXCSR 39
|
---|
451 | #define DWREG_X86_ES 40
|
---|
452 | #define DWREG_X86_CS 41
|
---|
453 | #define DWREG_X86_SS 42
|
---|
454 | #define DWREG_X86_DS 43
|
---|
455 | #define DWREG_X86_FS 44
|
---|
456 | #define DWREG_X86_GS 45
|
---|
457 | #define DWREG_X86_TR 48
|
---|
458 | #define DWREG_X86_LDTR 49
|
---|
459 | /** @} */
|
---|
460 |
|
---|
461 |
|
---|
462 | /** @name DWREG_AMD64_XXX - AMD64 register number mappings.
|
---|
463 | * @note This for some braindead reason the first 8 GPR are in intel encoding
|
---|
464 | * order, unlike the DWREG_X86_XXX variant. Utter stupidity.
|
---|
465 | * @{ */
|
---|
466 | #define DWREG_AMD64_RAX 0
|
---|
467 | #define DWREG_AMD64_RDX 1
|
---|
468 | #define DWREG_AMD64_RCX 2
|
---|
469 | #define DWREG_AMD64_RBX 3
|
---|
470 | #define DWREG_AMD64_RSI 4
|
---|
471 | #define DWREG_AMD64_RDI 5
|
---|
472 | #define DWREG_AMD64_RBP 6
|
---|
473 | #define DWREG_AMD64_RSP 7
|
---|
474 | #define DWREG_AMD64_R8 8
|
---|
475 | #define DWREG_AMD64_R9 9
|
---|
476 | #define DWREG_AMD64_R10 10
|
---|
477 | #define DWREG_AMD64_R11 11
|
---|
478 | #define DWREG_AMD64_R12 12
|
---|
479 | #define DWREG_AMD64_R13 13
|
---|
480 | #define DWREG_AMD64_R14 14
|
---|
481 | #define DWREG_AMD64_R15 15
|
---|
482 | #define DWREG_AMD64_RA 16 /* return address (=RIP) */
|
---|
483 | #define DWREG_AMD64_XMM0 17
|
---|
484 | #define DWREG_AMD64_XMM1 18
|
---|
485 | #define DWREG_AMD64_XMM2 19
|
---|
486 | #define DWREG_AMD64_XMM3 20
|
---|
487 | #define DWREG_AMD64_XMM4 21
|
---|
488 | #define DWREG_AMD64_XMM5 22
|
---|
489 | #define DWREG_AMD64_XMM6 23
|
---|
490 | #define DWREG_AMD64_XMM7 24
|
---|
491 | #define DWREG_AMD64_XMM8 25
|
---|
492 | #define DWREG_AMD64_XMM9 26
|
---|
493 | #define DWREG_AMD64_XMM10 27
|
---|
494 | #define DWREG_AMD64_XMM11 28
|
---|
495 | #define DWREG_AMD64_XMM12 29
|
---|
496 | #define DWREG_AMD64_XMM13 30
|
---|
497 | #define DWREG_AMD64_XMM14 31
|
---|
498 | #define DWREG_AMD64_XMM15 32
|
---|
499 | #define DWREG_AMD64_ST0 33
|
---|
500 | #define DWREG_AMD64_ST1 34
|
---|
501 | #define DWREG_AMD64_ST2 35
|
---|
502 | #define DWREG_AMD64_ST3 36
|
---|
503 | #define DWREG_AMD64_ST4 37
|
---|
504 | #define DWREG_AMD64_ST5 38
|
---|
505 | #define DWREG_AMD64_ST6 39
|
---|
506 | #define DWREG_AMD64_ST7 40
|
---|
507 | #define DWREG_AMD64_MM0 41
|
---|
508 | #define DWREG_AMD64_MM1 42
|
---|
509 | #define DWREG_AMD64_MM2 43
|
---|
510 | #define DWREG_AMD64_MM3 44
|
---|
511 | #define DWREG_AMD64_MM4 45
|
---|
512 | #define DWREG_AMD64_MM5 46
|
---|
513 | #define DWREG_AMD64_MM6 47
|
---|
514 | #define DWREG_AMD64_MM7 48
|
---|
515 | #define DWREG_AMD64_RFLAGS 49
|
---|
516 | #define DWREG_AMD64_ES 50
|
---|
517 | #define DWREG_AMD64_CS 51
|
---|
518 | #define DWREG_AMD64_SS 52
|
---|
519 | #define DWREG_AMD64_DS 53
|
---|
520 | #define DWREG_AMD64_FS 54
|
---|
521 | #define DWREG_AMD64_GS 55
|
---|
522 | #define DWREG_AMD64_FS_BASE 58
|
---|
523 | #define DWREG_AMD64_GS_BASE 59
|
---|
524 | #define DWREG_AMD64_TR 62
|
---|
525 | #define DWREG_AMD64_LDTR 63
|
---|
526 | #define DWREG_AMD64_MXCSR 64
|
---|
527 | #define DWREG_AMD64_FCW 65
|
---|
528 | #define DWREG_AMD64_FSW 66
|
---|
529 | /** @} */
|
---|
530 |
|
---|
531 | #endif /* !IPRT_INCLUDED_formats_dwarf_h */
|
---|
532 |
|
---|