1//===- llvm/Support/Dwarf.def - Dwarf definitions ---------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Macros for running through Dwarf enumerators.
10//
11//===----------------------------------------------------------------------===//
12
13// TODO: Add other DW-based macros.
14#if !( \
15 defined HANDLE_DW_TAG || defined HANDLE_DW_AT || defined HANDLE_DW_FORM || \
16 defined HANDLE_DW_OP || defined HANDLE_DW_LANG || defined HANDLE_DW_ATE || \
17 defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_DEFAULTED || \
18 defined HANDLE_DW_CC || defined HANDLE_DW_LNS || defined HANDLE_DW_LNE || \
19 defined HANDLE_DW_LNCT || defined HANDLE_DW_MACRO || \
20 defined HANDLE_DW_MACRO_GNU || defined HANDLE_MACRO_FLAG || \
21 defined HANDLE_DW_RLE || defined HANDLE_DW_LLE || \
22 (defined HANDLE_DW_CFA && defined HANDLE_DW_CFA_PRED) || \
23 defined HANDLE_DW_APPLE_PROPERTY || defined HANDLE_DW_UT || \
24 defined HANDLE_DWARF_SECTION || defined HANDLE_DW_IDX || \
25 defined HANDLE_DW_END || defined HANDLE_DW_SECT)
26#error "Missing macro definition of HANDLE_DW*"
27#endif
28
29#ifndef HANDLE_DW_TAG
30#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND)
31#endif
32
33// Note that DW_KIND is not a DWARF concept, but rather a way for us to
34// generate a list of tags that belong together.
35#ifndef DW_KIND_NONE
36#define DW_KIND_NONE 0
37#endif
38
39#ifndef DW_KIND_TYPE
40#define DW_KIND_TYPE 1
41#endif
42
43#ifndef HANDLE_DW_AT
44#define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR)
45#endif
46
47#ifndef HANDLE_DW_FORM
48#define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR)
49#endif
50
51#ifndef HANDLE_DW_OP
52#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR)
53#endif
54
55#ifndef HANDLE_DW_LANG
56#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR)
57#endif
58
59#ifndef HANDLE_DW_ATE
60#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR)
61#endif
62
63#ifndef HANDLE_DW_VIRTUALITY
64#define HANDLE_DW_VIRTUALITY(ID, NAME)
65#endif
66
67#ifndef HANDLE_DW_DEFAULTED
68#define HANDLE_DW_DEFAULTED(ID, NAME)
69#endif
70
71#ifndef HANDLE_DW_CC
72#define HANDLE_DW_CC(ID, NAME)
73#endif
74
75#ifndef HANDLE_DW_LNS
76#define HANDLE_DW_LNS(ID, NAME)
77#endif
78
79#ifndef HANDLE_DW_LNE
80#define HANDLE_DW_LNE(ID, NAME)
81#endif
82
83#ifndef HANDLE_DW_LNCT
84#define HANDLE_DW_LNCT(ID, NAME)
85#endif
86
87#ifndef HANDLE_DW_MACRO
88#define HANDLE_DW_MACRO(ID, NAME)
89#endif
90
91#ifndef HANDLE_DW_MACRO_GNU
92#define HANDLE_DW_MACRO_GNU(ID, NAME)
93#endif
94
95#ifndef HANDLE_MACRO_FLAG
96#define HANDLE_MACRO_FLAG(ID, NAME)
97#endif
98
99#ifndef HANDLE_DW_RLE
100#define HANDLE_DW_RLE(ID, NAME)
101#endif
102
103#ifndef HANDLE_DW_LLE
104#define HANDLE_DW_LLE(ID, NAME)
105#endif
106
107#ifndef HANDLE_DW_CFA
108#define HANDLE_DW_CFA(ID, NAME)
109#endif
110
111#ifndef HANDLE_DW_CFA_PRED
112#define HANDLE_DW_CFA_PRED(ID, NAME, PRED)
113#endif
114
115#ifndef HANDLE_DW_APPLE_PROPERTY
116#define HANDLE_DW_APPLE_PROPERTY(ID, NAME)
117#endif
118
119#ifndef HANDLE_DW_UT
120#define HANDLE_DW_UT(ID, NAME)
121#endif
122
123#ifndef HANDLE_DWARF_SECTION
124#define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME, OPTION)
125#endif
126
127#ifndef HANDLE_DW_IDX
128#define HANDLE_DW_IDX(ID, NAME)
129#endif
130
131#ifndef HANDLE_DW_END
132#define HANDLE_DW_END(ID, NAME)
133#endif
134
135#ifndef HANDLE_DW_SECT
136#define HANDLE_DW_SECT(ID, NAME)
137#endif
138
139HANDLE_DW_TAG(0x0000, null, 2, DWARF, DW_KIND_NONE)
140HANDLE_DW_TAG(0x0001, array_type, 2, DWARF, DW_KIND_TYPE)
141HANDLE_DW_TAG(0x0002, class_type, 2, DWARF, DW_KIND_TYPE)
142HANDLE_DW_TAG(0x0003, entry_point, 2, DWARF, DW_KIND_NONE)
143HANDLE_DW_TAG(0x0004, enumeration_type, 2, DWARF, DW_KIND_TYPE)
144HANDLE_DW_TAG(0x0005, formal_parameter, 2, DWARF, DW_KIND_NONE)
145HANDLE_DW_TAG(0x0008, imported_declaration, 2, DWARF, DW_KIND_NONE)
146HANDLE_DW_TAG(0x000a, label, 2, DWARF, DW_KIND_NONE)
147HANDLE_DW_TAG(0x000b, lexical_block, 2, DWARF, DW_KIND_NONE)
148HANDLE_DW_TAG(0x000d, member, 2, DWARF, DW_KIND_NONE)
149HANDLE_DW_TAG(0x000f, pointer_type, 2, DWARF, DW_KIND_TYPE)
150HANDLE_DW_TAG(0x0010, reference_type, 2, DWARF, DW_KIND_TYPE)
151HANDLE_DW_TAG(0x0011, compile_unit, 2, DWARF, DW_KIND_NONE)
152HANDLE_DW_TAG(0x0012, string_type, 2, DWARF, DW_KIND_TYPE)
153HANDLE_DW_TAG(0x0013, structure_type, 2, DWARF, DW_KIND_TYPE)
154HANDLE_DW_TAG(0x0015, subroutine_type, 2, DWARF, DW_KIND_TYPE)
155HANDLE_DW_TAG(0x0016, typedef, 2, DWARF, DW_KIND_TYPE)
156HANDLE_DW_TAG(0x0017, union_type, 2, DWARF, DW_KIND_TYPE)
157HANDLE_DW_TAG(0x0018, unspecified_parameters, 2, DWARF, DW_KIND_NONE)
158HANDLE_DW_TAG(0x0019, variant, 2, DWARF, DW_KIND_NONE)
159HANDLE_DW_TAG(0x001a, common_block, 2, DWARF, DW_KIND_NONE)
160HANDLE_DW_TAG(0x001b, common_inclusion, 2, DWARF, DW_KIND_NONE)
161HANDLE_DW_TAG(0x001c, inheritance, 2, DWARF, DW_KIND_NONE)
162HANDLE_DW_TAG(0x001d, inlined_subroutine, 2, DWARF, DW_KIND_NONE)
163HANDLE_DW_TAG(0x001e, module, 2, DWARF, DW_KIND_NONE)
164HANDLE_DW_TAG(0x001f, ptr_to_member_type, 2, DWARF, DW_KIND_TYPE)
165HANDLE_DW_TAG(0x0020, set_type, 2, DWARF, DW_KIND_TYPE)
166HANDLE_DW_TAG(0x0021, subrange_type, 2, DWARF, DW_KIND_TYPE)
167HANDLE_DW_TAG(0x0022, with_stmt, 2, DWARF, DW_KIND_NONE)
168HANDLE_DW_TAG(0x0023, access_declaration, 2, DWARF, DW_KIND_NONE)
169HANDLE_DW_TAG(0x0024, base_type, 2, DWARF, DW_KIND_TYPE)
170HANDLE_DW_TAG(0x0025, catch_block, 2, DWARF, DW_KIND_NONE)
171HANDLE_DW_TAG(0x0026, const_type, 2, DWARF, DW_KIND_TYPE)
172HANDLE_DW_TAG(0x0027, constant, 2, DWARF, DW_KIND_NONE)
173HANDLE_DW_TAG(0x0028, enumerator, 2, DWARF, DW_KIND_NONE)
174HANDLE_DW_TAG(0x0029, file_type, 2, DWARF, DW_KIND_TYPE)
175HANDLE_DW_TAG(0x002a, friend, 2, DWARF, DW_KIND_NONE)
176HANDLE_DW_TAG(0x002b, namelist, 2, DWARF, DW_KIND_NONE)
177HANDLE_DW_TAG(0x002c, namelist_item, 2, DWARF, DW_KIND_NONE)
178HANDLE_DW_TAG(0x002d, packed_type, 2, DWARF, DW_KIND_TYPE)
179HANDLE_DW_TAG(0x002e, subprogram, 2, DWARF, DW_KIND_NONE)
180HANDLE_DW_TAG(0x002f, template_type_parameter, 2, DWARF, DW_KIND_NONE)
181HANDLE_DW_TAG(0x0030, template_value_parameter, 2, DWARF, DW_KIND_NONE)
182HANDLE_DW_TAG(0x0031, thrown_type, 2, DWARF, DW_KIND_TYPE)
183HANDLE_DW_TAG(0x0032, try_block, 2, DWARF, DW_KIND_NONE)
184HANDLE_DW_TAG(0x0033, variant_part, 2, DWARF, DW_KIND_NONE)
185HANDLE_DW_TAG(0x0034, variable, 2, DWARF, DW_KIND_NONE)
186HANDLE_DW_TAG(0x0035, volatile_type, 2, DWARF, DW_KIND_TYPE)
187// New in DWARF v3:
188HANDLE_DW_TAG(0x0036, dwarf_procedure, 3, DWARF, DW_KIND_NONE)
189HANDLE_DW_TAG(0x0037, restrict_type, 3, DWARF, DW_KIND_TYPE)
190HANDLE_DW_TAG(0x0038, interface_type, 3, DWARF, DW_KIND_TYPE)
191HANDLE_DW_TAG(0x0039, namespace, 3, DWARF, DW_KIND_NONE)
192HANDLE_DW_TAG(0x003a, imported_module, 3, DWARF, DW_KIND_NONE)
193HANDLE_DW_TAG(0x003b, unspecified_type, 3, DWARF, DW_KIND_TYPE)
194HANDLE_DW_TAG(0x003c, partial_unit, 3, DWARF, DW_KIND_NONE)
195HANDLE_DW_TAG(0x003d, imported_unit, 3, DWARF, DW_KIND_NONE)
196HANDLE_DW_TAG(0x003f, condition, 3, DWARF, DW_KIND_NONE)
197HANDLE_DW_TAG(0x0040, shared_type, 3, DWARF, DW_KIND_TYPE)
198// New in DWARF v4:
199HANDLE_DW_TAG(0x0041, type_unit, 4, DWARF, DW_KIND_NONE)
200HANDLE_DW_TAG(0x0042, rvalue_reference_type, 4, DWARF, DW_KIND_TYPE)
201HANDLE_DW_TAG(0x0043, template_alias, 4, DWARF, DW_KIND_NONE)
202// New in DWARF v5:
203HANDLE_DW_TAG(0x0044, coarray_type, 5, DWARF, DW_KIND_TYPE)
204HANDLE_DW_TAG(0x0045, generic_subrange, 5, DWARF, DW_KIND_NONE)
205HANDLE_DW_TAG(0x0046, dynamic_type, 5, DWARF, DW_KIND_TYPE)
206HANDLE_DW_TAG(0x0047, atomic_type, 5, DWARF, DW_KIND_TYPE)
207HANDLE_DW_TAG(0x0048, call_site, 5, DWARF, DW_KIND_NONE)
208HANDLE_DW_TAG(0x0049, call_site_parameter, 5, DWARF, DW_KIND_NONE)
209HANDLE_DW_TAG(0x004a, skeleton_unit, 5, DWARF, DW_KIND_NONE)
210HANDLE_DW_TAG(0x004b, immutable_type, 5, DWARF, DW_KIND_TYPE)
211// Vendor extensions:
212HANDLE_DW_TAG(0x4081, MIPS_loop, 0, MIPS, DW_KIND_NONE)
213// Conflicting:
214// HANDLE_DW_TAG(0x4081, HP_array_descriptor, 0, HP, DW_KIND_NONE)
215HANDLE_DW_TAG(0x4101, format_label, 0, GNU, DW_KIND_NONE)
216HANDLE_DW_TAG(0x4102, function_template, 0, GNU, DW_KIND_NONE)
217HANDLE_DW_TAG(0x4103, class_template, 0, GNU, DW_KIND_NONE)
218
219HANDLE_DW_TAG(0x4104, GNU_BINCL, 0, GNU, DW_KIND_NONE)
220HANDLE_DW_TAG(0x4105, GNU_EINCL, 0, GNU, DW_KIND_NONE)
221HANDLE_DW_TAG(0x4106, GNU_template_template_param, 0, GNU, DW_KIND_NONE)
222HANDLE_DW_TAG(0x4107, GNU_template_parameter_pack, 0, GNU, DW_KIND_NONE)
223HANDLE_DW_TAG(0x4108, GNU_formal_parameter_pack, 0, GNU, DW_KIND_NONE)
224HANDLE_DW_TAG(0x4109, GNU_call_site, 0, GNU, DW_KIND_NONE)
225HANDLE_DW_TAG(0x410a, GNU_call_site_parameter, 0, GNU, DW_KIND_NONE)
226
227HANDLE_DW_TAG(0x4200, APPLE_property, 0, APPLE, DW_KIND_NONE)
228
229HANDLE_DW_TAG(0x4201, SUN_function_template, 0, SUN, DW_KIND_NONE)
230HANDLE_DW_TAG(0x4202, SUN_class_template, 0, SUN, DW_KIND_NONE)
231HANDLE_DW_TAG(0x4203, SUN_struct_template, 0, SUN, DW_KIND_NONE)
232HANDLE_DW_TAG(0x4204, SUN_union_template, 0, SUN, DW_KIND_NONE)
233HANDLE_DW_TAG(0x4205, SUN_indirect_inheritance, 0, SUN, DW_KIND_NONE)
234HANDLE_DW_TAG(0x4206, SUN_codeflags, 0, SUN, DW_KIND_NONE)
235HANDLE_DW_TAG(0x4207, SUN_memop_info, 0, SUN, DW_KIND_NONE)
236HANDLE_DW_TAG(0x4208, SUN_omp_child_func, 0, SUN, DW_KIND_NONE)
237HANDLE_DW_TAG(0x4209, SUN_rtti_descriptor, 0, SUN, DW_KIND_NONE)
238HANDLE_DW_TAG(0x420a, SUN_dtor_info, 0, SUN, DW_KIND_NONE)
239HANDLE_DW_TAG(0x420b, SUN_dtor, 0, SUN, DW_KIND_NONE)
240HANDLE_DW_TAG(0x420c, SUN_f90_interface, 0, SUN, DW_KIND_NONE)
241HANDLE_DW_TAG(0x420d, SUN_fortran_vax_structure, 0, SUN, DW_KIND_NONE)
242HANDLE_DW_TAG(0x42ff, SUN_hi, 0, SUN, DW_KIND_NONE)
243
244// DSP-C/Starcore __circ, _rev
245HANDLE_DW_TAG(0x5101, ALTIUM_circ_type, 0, ALTIUM, DW_KIND_NONE)
246HANDLE_DW_TAG(0x5102, ALTIUM_mwa_circ_type, 0, ALTIUM, DW_KIND_NONE)
247HANDLE_DW_TAG(0x5103, ALTIUM_rev_carry_type, 0, ALTIUM, DW_KIND_NONE)
248// M16 __rom qualifier
249HANDLE_DW_TAG(0x5111, ALTIUM_rom, 0, ALTIUM, DW_KIND_NONE)
250
251// Green Hills.
252HANDLE_DW_TAG(0x8004, GHS_namespace, 0, GHS, DW_KIND_NONE)
253HANDLE_DW_TAG(0x8005, GHS_using_namespace, 0, GHS, DW_KIND_NONE)
254HANDLE_DW_TAG(0x8006, GHS_using_declaration, 0, GHS, DW_KIND_NONE)
255HANDLE_DW_TAG(0x8007, GHS_template_templ_param, 0, GHS, DW_KIND_NONE)
256
257// Unified Parallel C.
258HANDLE_DW_TAG(0x8765, UPC_shared_type, 0, UPC, DW_KIND_NONE)
259HANDLE_DW_TAG(0x8766, UPC_strict_type, 0, UPC, DW_KIND_NONE)
260HANDLE_DW_TAG(0x8767, UPC_relaxed, 0, UPC, DW_KIND_NONE)
261
262HANDLE_DW_TAG(0xa000, PGI_kanji_type, 0, PGI, DW_KIND_NONE)
263HANDLE_DW_TAG(0xa020, PGI_interface_block, 0, PGI, DW_KIND_NONE)
264
265HANDLE_DW_TAG(0xb000, BORLAND_property, 0, BORLAND, DW_KIND_NONE)
266HANDLE_DW_TAG(0xb001, BORLAND_Delphi_string, 0, BORLAND, DW_KIND_TYPE)
267HANDLE_DW_TAG(0xb002, BORLAND_Delphi_dynamic_array, 0, BORLAND, DW_KIND_TYPE)
268HANDLE_DW_TAG(0xb003, BORLAND_Delphi_set, 0, BORLAND, DW_KIND_TYPE)
269HANDLE_DW_TAG(0xb004, BORLAND_Delphi_variant, 0, BORLAND, DW_KIND_TYPE)
270
271// Attributes.
272HANDLE_DW_AT(0x01, sibling, 2, DWARF)
273HANDLE_DW_AT(0x02, location, 2, DWARF)
274HANDLE_DW_AT(0x03, name, 2, DWARF)
275HANDLE_DW_AT(0x09, ordering, 2, DWARF)
276HANDLE_DW_AT(0x0b, byte_size, 2, DWARF)
277HANDLE_DW_AT(0x0c, bit_offset, 2, DWARF)
278HANDLE_DW_AT(0x0d, bit_size, 2, DWARF)
279HANDLE_DW_AT(0x10, stmt_list, 2, DWARF)
280HANDLE_DW_AT(0x11, low_pc, 2, DWARF)
281HANDLE_DW_AT(0x12, high_pc, 2, DWARF)
282HANDLE_DW_AT(0x13, language, 2, DWARF)
283HANDLE_DW_AT(0x15, discr, 2, DWARF)
284HANDLE_DW_AT(0x16, discr_value, 2, DWARF)
285HANDLE_DW_AT(0x17, visibility, 2, DWARF)
286HANDLE_DW_AT(0x18, import, 2, DWARF)
287HANDLE_DW_AT(0x19, string_length, 2, DWARF)
288HANDLE_DW_AT(0x1a, common_reference, 2, DWARF)
289HANDLE_DW_AT(0x1b, comp_dir, 2, DWARF)
290HANDLE_DW_AT(0x1c, const_value, 2, DWARF)
291HANDLE_DW_AT(0x1d, containing_type, 2, DWARF)
292HANDLE_DW_AT(0x1e, default_value, 2, DWARF)
293HANDLE_DW_AT(0x20, inline, 2, DWARF)
294HANDLE_DW_AT(0x21, is_optional, 2, DWARF)
295HANDLE_DW_AT(0x22, lower_bound, 2, DWARF)
296HANDLE_DW_AT(0x25, producer, 2, DWARF)
297HANDLE_DW_AT(0x27, prototyped, 2, DWARF)
298HANDLE_DW_AT(0x2a, return_addr, 2, DWARF)
299HANDLE_DW_AT(0x2c, start_scope, 2, DWARF)
300HANDLE_DW_AT(0x2e, bit_stride, 2, DWARF)
301HANDLE_DW_AT(0x2f, upper_bound, 2, DWARF)
302HANDLE_DW_AT(0x31, abstract_origin, 2, DWARF)
303HANDLE_DW_AT(0x32, accessibility, 2, DWARF)
304HANDLE_DW_AT(0x33, address_class, 2, DWARF)
305HANDLE_DW_AT(0x34, artificial, 2, DWARF)
306HANDLE_DW_AT(0x35, base_types, 2, DWARF)
307HANDLE_DW_AT(0x36, calling_convention, 2, DWARF)
308HANDLE_DW_AT(0x37, count, 2, DWARF)
309HANDLE_DW_AT(0x38, data_member_location, 2, DWARF)
310HANDLE_DW_AT(0x39, decl_column, 2, DWARF)
311HANDLE_DW_AT(0x3a, decl_file, 2, DWARF)
312HANDLE_DW_AT(0x3b, decl_line, 2, DWARF)
313HANDLE_DW_AT(0x3c, declaration, 2, DWARF)
314HANDLE_DW_AT(0x3d, discr_list, 2, DWARF)
315HANDLE_DW_AT(0x3e, encoding, 2, DWARF)
316HANDLE_DW_AT(0x3f, external, 2, DWARF)
317HANDLE_DW_AT(0x40, frame_base, 2, DWARF)
318HANDLE_DW_AT(0x41, friend, 2, DWARF)
319HANDLE_DW_AT(0x42, identifier_case, 2, DWARF)
320HANDLE_DW_AT(0x43, macro_info, 2, DWARF)
321HANDLE_DW_AT(0x44, namelist_item, 2, DWARF)
322HANDLE_DW_AT(0x45, priority, 2, DWARF)
323HANDLE_DW_AT(0x46, segment, 2, DWARF)
324HANDLE_DW_AT(0x47, specification, 2, DWARF)
325HANDLE_DW_AT(0x48, static_link, 2, DWARF)
326HANDLE_DW_AT(0x49, type, 2, DWARF)
327HANDLE_DW_AT(0x4a, use_location, 2, DWARF)
328HANDLE_DW_AT(0x4b, variable_parameter, 2, DWARF)
329HANDLE_DW_AT(0x4c, virtuality, 2, DWARF)
330HANDLE_DW_AT(0x4d, vtable_elem_location, 2, DWARF)
331// New in DWARF v3:
332HANDLE_DW_AT(0x4e, allocated, 3, DWARF)
333HANDLE_DW_AT(0x4f, associated, 3, DWARF)
334HANDLE_DW_AT(0x50, data_location, 3, DWARF)
335HANDLE_DW_AT(0x51, byte_stride, 3, DWARF)
336HANDLE_DW_AT(0x52, entry_pc, 3, DWARF)
337HANDLE_DW_AT(0x53, use_UTF8, 3, DWARF)
338HANDLE_DW_AT(0x54, extension, 3, DWARF)
339HANDLE_DW_AT(0x55, ranges, 3, DWARF)
340HANDLE_DW_AT(0x56, trampoline, 3, DWARF)
341HANDLE_DW_AT(0x57, call_column, 3, DWARF)
342HANDLE_DW_AT(0x58, call_file, 3, DWARF)
343HANDLE_DW_AT(0x59, call_line, 3, DWARF)
344HANDLE_DW_AT(0x5a, description, 3, DWARF)
345HANDLE_DW_AT(0x5b, binary_scale, 3, DWARF)
346HANDLE_DW_AT(0x5c, decimal_scale, 3, DWARF)
347HANDLE_DW_AT(0x5d, small, 3, DWARF)
348HANDLE_DW_AT(0x5e, decimal_sign, 3, DWARF)
349HANDLE_DW_AT(0x5f, digit_count, 3, DWARF)
350HANDLE_DW_AT(0x60, picture_string, 3, DWARF)
351HANDLE_DW_AT(0x61, mutable, 3, DWARF)
352HANDLE_DW_AT(0x62, threads_scaled, 3, DWARF)
353HANDLE_DW_AT(0x63, explicit, 3, DWARF)
354HANDLE_DW_AT(0x64, object_pointer, 3, DWARF)
355HANDLE_DW_AT(0x65, endianity, 3, DWARF)
356HANDLE_DW_AT(0x66, elemental, 3, DWARF)
357HANDLE_DW_AT(0x67, pure, 3, DWARF)
358HANDLE_DW_AT(0x68, recursive, 3, DWARF)
359// New in DWARF v4:
360HANDLE_DW_AT(0x69, signature, 4, DWARF)
361HANDLE_DW_AT(0x6a, main_subprogram, 4, DWARF)
362HANDLE_DW_AT(0x6b, data_bit_offset, 4, DWARF)
363HANDLE_DW_AT(0x6c, const_expr, 4, DWARF)
364HANDLE_DW_AT(0x6d, enum_class, 4, DWARF)
365HANDLE_DW_AT(0x6e, linkage_name, 4, DWARF)
366// New in DWARF v5:
367HANDLE_DW_AT(0x6f, string_length_bit_size, 5, DWARF)
368HANDLE_DW_AT(0x70, string_length_byte_size, 5, DWARF)
369HANDLE_DW_AT(0x71, rank, 5, DWARF)
370HANDLE_DW_AT(0x72, str_offsets_base, 5, DWARF)
371HANDLE_DW_AT(0x73, addr_base, 5, DWARF)
372HANDLE_DW_AT(0x74, rnglists_base, 5, DWARF)
373HANDLE_DW_AT(0x75, dwo_id, 0, DWARF) ///< Retracted from DWARF v5.
374HANDLE_DW_AT(0x76, dwo_name, 5, DWARF)
375HANDLE_DW_AT(0x77, reference, 5, DWARF)
376HANDLE_DW_AT(0x78, rvalue_reference, 5, DWARF)
377HANDLE_DW_AT(0x79, macros, 5, DWARF)
378HANDLE_DW_AT(0x7a, call_all_calls, 5, DWARF)
379HANDLE_DW_AT(0x7b, call_all_source_calls, 5, DWARF)
380HANDLE_DW_AT(0x7c, call_all_tail_calls, 5, DWARF)
381HANDLE_DW_AT(0x7d, call_return_pc, 5, DWARF)
382HANDLE_DW_AT(0x7e, call_value, 5, DWARF)
383HANDLE_DW_AT(0x7f, call_origin, 5, DWARF)
384HANDLE_DW_AT(0x80, call_parameter, 5, DWARF)
385HANDLE_DW_AT(0x81, call_pc, 5, DWARF)
386HANDLE_DW_AT(0x82, call_tail_call, 5, DWARF)
387HANDLE_DW_AT(0x83, call_target, 5, DWARF)
388HANDLE_DW_AT(0x84, call_target_clobbered, 5, DWARF)
389HANDLE_DW_AT(0x85, call_data_location, 5, DWARF)
390HANDLE_DW_AT(0x86, call_data_value, 5, DWARF)
391HANDLE_DW_AT(0x87, noreturn, 5, DWARF)
392HANDLE_DW_AT(0x88, alignment, 5, DWARF)
393HANDLE_DW_AT(0x89, export_symbols, 5, DWARF)
394HANDLE_DW_AT(0x8a, deleted, 5, DWARF)
395HANDLE_DW_AT(0x8b, defaulted, 5, DWARF)
396HANDLE_DW_AT(0x8c, loclists_base, 5, DWARF)
397
398// Vendor extensions:
399HANDLE_DW_AT(0x806, GHS_namespace_alias, 0, GHS)
400HANDLE_DW_AT(0x807, GHS_using_namespace, 0, GHS)
401HANDLE_DW_AT(0x808, GHS_using_declaration, 0, GHS)
402
403HANDLE_DW_AT(0x2001, MIPS_fde, 0, MIPS)
404HANDLE_DW_AT(0x2002, MIPS_loop_begin, 0, MIPS)
405HANDLE_DW_AT(0x2003, MIPS_tail_loop_begin, 0, MIPS)
406HANDLE_DW_AT(0x2004, MIPS_epilog_begin, 0, MIPS)
407HANDLE_DW_AT(0x2005, MIPS_loop_unroll_factor, 0, MIPS)
408HANDLE_DW_AT(0x2006, MIPS_software_pipeline_depth, 0, MIPS)
409HANDLE_DW_AT(0x2007, MIPS_linkage_name, 0, MIPS)
410// Conflicting:
411// HANDLE_DW_AT(0x2007, GHS_mangled, 0, GHS)
412HANDLE_DW_AT(0x2008, MIPS_stride, 0, MIPS)
413HANDLE_DW_AT(0x2009, MIPS_abstract_name, 0, MIPS)
414HANDLE_DW_AT(0x200a, MIPS_clone_origin, 0, MIPS)
415HANDLE_DW_AT(0x200b, MIPS_has_inlines, 0, MIPS)
416HANDLE_DW_AT(0x200c, MIPS_stride_byte, 0, MIPS)
417HANDLE_DW_AT(0x200d, MIPS_stride_elem, 0, MIPS)
418HANDLE_DW_AT(0x200e, MIPS_ptr_dopetype, 0, MIPS)
419HANDLE_DW_AT(0x200f, MIPS_allocatable_dopetype, 0, MIPS)
420HANDLE_DW_AT(0x2010, MIPS_assumed_shape_dopetype, 0, MIPS)
421
422// This one appears to have only been implemented by Open64 for
423// fortran and may conflict with other extensions.
424HANDLE_DW_AT(0x2011, MIPS_assumed_size, 0, MIPS)
425
426// HP 0x2001-0x2011 conflict with MIPS
427// HANDLE_DW_AT(0x2001, HP_unmodifiable, 0, HP)
428// HANDLE_DW_AT(0x2005, HP_prologue, 0, HP)
429// HANDLE_DW_AT(0x2008, HP_epilogue, 0, HP)
430// HANDLE_DW_AT(0x2010, HP_actuals_stmt_list, 0, HP)
431// HANDLE_DW_AT(0x2011, HP_proc_per_section, 0, HP)
432
433HANDLE_DW_AT(0x2012, HP_raw_data_ptr, 0, HP)
434HANDLE_DW_AT(0x2013, HP_pass_by_reference, 0, HP)
435HANDLE_DW_AT(0x2014, HP_opt_level, 0, HP)
436HANDLE_DW_AT(0x2015, HP_prof_version_id, 0, HP)
437HANDLE_DW_AT(0x2016, HP_opt_flags, 0, HP)
438HANDLE_DW_AT(0x2017, HP_cold_region_low_pc, 0, HP)
439HANDLE_DW_AT(0x2018, HP_cold_region_high_pc, 0, HP)
440HANDLE_DW_AT(0x2019, HP_all_variables_modifiable, 0, HP)
441HANDLE_DW_AT(0x201a, HP_linkage_name, 0, HP)
442HANDLE_DW_AT(0x201b, HP_prof_flags, 0, HP)
443HANDLE_DW_AT(0x201f, HP_unit_name, 0, HP)
444HANDLE_DW_AT(0x2020, HP_unit_size, 0, HP)
445HANDLE_DW_AT(0x2021, HP_widened_byte_size, 0, HP)
446HANDLE_DW_AT(0x2022, HP_definition_points, 0, HP)
447HANDLE_DW_AT(0x2023, HP_default_location, 0, HP)
448HANDLE_DW_AT(0x2029, HP_is_result_param, 0, HP)
449
450// COMPAQ/HP Conflicts with MIPS/HP 0x2001 - 0x2005
451// HANDLE_DW_AT(0x2001, CPQ_discontig_ranges, 0, COMPAQ)
452// HANDLE_DW_AT(0x2002, CPQ_semantic_events, 0, COMPAQ)
453// HANDLE_DW_AT(0x2003, CPQ_split_lifetimes_var, 0, COMPAQ)
454// HANDLE_DW_AT(0x2004, CPQ_split_lifetimes_rtn, 0, COMPAQ)
455// HANDLE_DW_AT(0x2005, CPQ_prologue_length, 0, COMPAQ)
456
457HANDLE_DW_AT(0x2026, DW_AT_INTEL_other_endian, 0, INTEL)
458
459// Green Hills.
460HANDLE_DW_AT(0x2083, GHS_rsm, 0, GHS)
461HANDLE_DW_AT(0x2085, GHS_frsm, 0, GHS)
462HANDLE_DW_AT(0x2086, GHS_frames, 0, GHS)
463HANDLE_DW_AT(0x2087, GHS_rso, 0, GHS)
464HANDLE_DW_AT(0x2092, GHS_subcpu, 0, GHS)
465HANDLE_DW_AT(0x2093, GHS_lbrace_line, 0, GHS)
466
467// GNU extensions
468HANDLE_DW_AT(0x2101, sf_names, 0, GNU)
469HANDLE_DW_AT(0x2102, src_info, 0, GNU)
470HANDLE_DW_AT(0x2103, mac_info, 0, GNU)
471HANDLE_DW_AT(0x2104, src_coords, 0, GNU)
472HANDLE_DW_AT(0x2105, body_begin, 0, GNU)
473HANDLE_DW_AT(0x2106, body_end, 0, GNU)
474HANDLE_DW_AT(0x2107, GNU_vector, 0, GNU)
475HANDLE_DW_AT(0x210f, GNU_odr_signature, 0, GNU)
476HANDLE_DW_AT(0x2110, GNU_template_name, 0, GNU)
477HANDLE_DW_AT(0x2111, GNU_call_site_value, 0, GNU)
478HANDLE_DW_AT(0x2112, GNU_call_site_data_value, 0, GNU)
479HANDLE_DW_AT(0x2113, GNU_call_site_target, 0, GNU)
480HANDLE_DW_AT(0x2114, GNU_call_site_target_clobbered, 0, GNU)
481HANDLE_DW_AT(0x2115, GNU_tail_call, 0, GNU)
482HANDLE_DW_AT(0x2116, GNU_all_tail_call_sites, 0, GNU)
483HANDLE_DW_AT(0x2117, GNU_all_call_sites, 0, GNU)
484HANDLE_DW_AT(0x2118, GNU_all_source_call_sites, 0, GNU)
485HANDLE_DW_AT(0x2119, GNU_macros, 0, GNU)
486HANDLE_DW_AT(0x211a, GNU_deleted, 0, GNU)
487// Extensions for Fission proposal.
488HANDLE_DW_AT(0x2130, GNU_dwo_name, 0, GNU)
489HANDLE_DW_AT(0x2131, GNU_dwo_id, 0, GNU)
490HANDLE_DW_AT(0x2132, GNU_ranges_base, 0, GNU)
491HANDLE_DW_AT(0x2133, GNU_addr_base, 0, GNU)
492HANDLE_DW_AT(0x2134, GNU_pubnames, 0, GNU)
493HANDLE_DW_AT(0x2135, GNU_pubtypes, 0, GNU)
494HANDLE_DW_AT(0x2136, GNU_discriminator, 0, GNU)
495HANDLE_DW_AT(0x2137, GNU_entry_view, 0, GNU)
496
497HANDLE_DW_AT(0x2201, SUN_template, 0, SUN)
498// Conflicting:
499// HANDLE_DW_AT(0x2201, VMS_rtnbeg_pd_address);
500
501HANDLE_DW_AT(0x2202, SUN_alignment, 0, SUN)
502HANDLE_DW_AT(0x2203, SUN_vtable, 0, SUN)
503HANDLE_DW_AT(0x2204, SUN_count_guarantee, 0, SUN)
504HANDLE_DW_AT(0x2205, SUN_command_line, 0, SUN)
505HANDLE_DW_AT(0x2206, SUN_vbase, 0, SUN)
506HANDLE_DW_AT(0x2207, SUN_compile_options, 0, SUN)
507HANDLE_DW_AT(0x2208, SUN_language, 0, SUN)
508HANDLE_DW_AT(0x2209, SUN_browser_file, 0, SUN)
509HANDLE_DW_AT(0x2210, SUN_vtable_abi, 0, SUN)
510HANDLE_DW_AT(0x2211, SUN_func_offsets, 0, SUN)
511HANDLE_DW_AT(0x2212, SUN_cf_kind, 0, SUN)
512HANDLE_DW_AT(0x2213, SUN_vtable_index, 0, SUN)
513HANDLE_DW_AT(0x2214, SUN_omp_tpriv_addr, 0, SUN)
514HANDLE_DW_AT(0x2215, SUN_omp_child_func, 0, SUN)
515HANDLE_DW_AT(0x2216, SUN_func_offset, 0, SUN)
516HANDLE_DW_AT(0x2217, SUN_memop_type_ref, 0, SUN)
517HANDLE_DW_AT(0x2218, SUN_profile_id, 0, SUN)
518HANDLE_DW_AT(0x2219, SUN_memop_signature, 0, SUN)
519
520HANDLE_DW_AT(0x2220, SUN_obj_dir, 0, SUN)
521HANDLE_DW_AT(0x2221, SUN_obj_file, 0, SUN)
522HANDLE_DW_AT(0x2222, SUN_original_name, 0, SUN)
523HANDLE_DW_AT(0x2223, SUN_hwcprof_signature, 0, SUN)
524HANDLE_DW_AT(0x2224, SUN_amd64_parmdump, 0, SUN)
525HANDLE_DW_AT(0x2225, SUN_part_link_name, 0, SUN)
526HANDLE_DW_AT(0x2226, SUN_link_name, 0, SUN)
527HANDLE_DW_AT(0x2227, SUN_pass_with_const, 0, SUN)
528HANDLE_DW_AT(0x2228, SUN_return_with_const, 0, SUN)
529HANDLE_DW_AT(0x2229, SUN_import_by_name, 0, SUN)
530HANDLE_DW_AT(0x222a, SUN_90_pointer, 0, SUN)
531HANDLE_DW_AT(0x222b, SUN_pass_by_ref, 0, SUN)
532HANDLE_DW_AT(0x222c, SUN_f90_allocatable, 0, SUN)
533HANDLE_DW_AT(0x222d, SUN_f90_assumed_shape_array, 0, SUN)
534HANDLE_DW_AT(0x222e, SUN_c_vla, 0, SUN)
535HANDLE_DW_AT(0x2230, SUN_return_value_ptr, 0, SUN)
536HANDLE_DW_AT(0x2231, SUN_dtor_start, 0, SUN)
537HANDLE_DW_AT(0x2232, SUN_dtor_length, 0, SUN)
538HANDLE_DW_AT(0x2233, SUN_dtor_state_initial, 0, SUN)
539HANDLE_DW_AT(0x2234, SUN_dtor_state_final, 0, SUN)
540HANDLE_DW_AT(0x2235, SUN_dtor_state_deltas, 0, SUN)
541HANDLE_DW_AT(0x2236, SUN_import_by_lname, 0, SUN)
542HANDLE_DW_AT(0x2237, SUN_f90_use_only, 0, SUN)
543HANDLE_DW_AT(0x2238, SUN_namelist_spec, 0, SUN)
544HANDLE_DW_AT(0x2239, SUN_is_omp_child_func, 0, SUN)
545HANDLE_DW_AT(0x223a, SUN_fortran_main_alias, 0, SUN)
546HANDLE_DW_AT(0x223b, SUN_fortran_based, 0, SUN)
547
548HANDLE_DW_AT(0x2300, ALTIUM_loclist, 0, ALTIUM)
549
550HANDLE_DW_AT(0x2301, use_GNAT_descriptive_type, 0, GNU)
551HANDLE_DW_AT(0x2302, GNAT_descriptive_type, 0, GNU)
552HANDLE_DW_AT(0x2303, GNU_numerator, 0, GNU)
553HANDLE_DW_AT(0x2304, GNU_denominator, 0, GNU)
554HANDLE_DW_AT(0x2305, GNU_bias, 0, GNU)
555
556HANDLE_DW_AT(0x2900, GO_kind, 0, GO)
557HANDLE_DW_AT(0x2901, GO_key, 0, GO)
558HANDLE_DW_AT(0x2902, GO_elem, 0, GO)
559HANDLE_DW_AT(0x2903, GO_embedded_field, 0, GO)
560HANDLE_DW_AT(0x2904, GO_runtime_type, 0, GO)
561
562HANDLE_DW_AT(0x3210, UPC_threads_scaled, 0, UPC)
563
564HANDLE_DW_AT(0x393e, IBM_wsa_addr, 0, IBM)
565HANDLE_DW_AT(0x393f, IBM_home_location, 0, IBM)
566HANDLE_DW_AT(0x3940, IBM_alt_srcview, 0, IBM)
567
568// PGI extensions (STMicroelectronics)
569HANDLE_DW_AT(0x3a00, PGI_lbase, 0, PGI)
570HANDLE_DW_AT(0x3a01, PGI_soffset, 0, PGI)
571HANDLE_DW_AT(0x3a02, PGI_lstride, 0, PGI)
572
573// Borland extensions.
574HANDLE_DW_AT(0x3b11, BORLAND_property_read, 0, BORLAND)
575HANDLE_DW_AT(0x3b12, BORLAND_property_write, 0, BORLAND)
576HANDLE_DW_AT(0x3b13, BORLAND_property_implements, 0, BORLAND)
577HANDLE_DW_AT(0x3b14, BORLAND_property_index, 0, BORLAND)
578HANDLE_DW_AT(0x3b15, BORLAND_property_default, 0, BORLAND)
579HANDLE_DW_AT(0x3b20, BORLAND_Delphi_unit, 0, BORLAND)
580HANDLE_DW_AT(0x3b21, BORLAND_Delphi_class, 0, BORLAND)
581HANDLE_DW_AT(0x3b22, BORLAND_Delphi_record, 0, BORLAND)
582HANDLE_DW_AT(0x3b23, BORLAND_Delphi_metaclass, 0, BORLAND)
583HANDLE_DW_AT(0x3b24, BORLAND_Delphi_constructor, 0, BORLAND)
584HANDLE_DW_AT(0x3b25, BORLAND_Delphi_destructor, 0, BORLAND)
585HANDLE_DW_AT(0x3b26, BORLAND_Delphi_anonymous_method, 0, BORLAND)
586HANDLE_DW_AT(0x3b27, BORLAND_Delphi_interface, 0, BORLAND)
587HANDLE_DW_AT(0x3b28, BORLAND_Delphi_ABI, 0, BORLAND)
588HANDLE_DW_AT(0x3b29, BORLAND_Delphi_return, 0, BORLAND)
589HANDLE_DW_AT(0x3b30, BORLAND_Delphi_frameptr, 0, BORLAND)
590HANDLE_DW_AT(0x3b31, BORLAND_closure, 0, BORLAND)
591// LLVM project extensions.
592HANDLE_DW_AT(0x3e00, LLVM_include_path, 0, LLVM)
593HANDLE_DW_AT(0x3e01, LLVM_config_macros, 0, LLVM)
594HANDLE_DW_AT(0x3e02, LLVM_sysroot, 0, LLVM)
595HANDLE_DW_AT(0x3e03, LLVM_tag_offset, 0, LLVM)
596// The missing numbers here are reserved for ptrauth support.
597HANDLE_DW_AT(0x3e07, LLVM_apinotes, 0, APPLE)
598
599// Apple extensions.
600
601HANDLE_DW_AT(0x3fe1, APPLE_optimized, 0, APPLE)
602HANDLE_DW_AT(0x3fe2, APPLE_flags, 0, APPLE)
603HANDLE_DW_AT(0x3fe3, APPLE_isa, 0, APPLE)
604HANDLE_DW_AT(0x3fe4, APPLE_block, 0, APPLE)
605HANDLE_DW_AT(0x3fe5, APPLE_major_runtime_vers, 0, APPLE)
606HANDLE_DW_AT(0x3fe6, APPLE_runtime_class, 0, APPLE)
607HANDLE_DW_AT(0x3fe7, APPLE_omit_frame_ptr, 0, APPLE)
608HANDLE_DW_AT(0x3fe8, APPLE_property_name, 0, APPLE)
609HANDLE_DW_AT(0x3fe9, APPLE_property_getter, 0, APPLE)
610HANDLE_DW_AT(0x3fea, APPLE_property_setter, 0, APPLE)
611HANDLE_DW_AT(0x3feb, APPLE_property_attribute, 0, APPLE)
612HANDLE_DW_AT(0x3fec, APPLE_objc_complete_type, 0, APPLE)
613HANDLE_DW_AT(0x3fed, APPLE_property, 0, APPLE)
614HANDLE_DW_AT(0x3fee, APPLE_objc_direct, 0, APPLE)
615HANDLE_DW_AT(0x3fef, APPLE_sdk, 0, APPLE)
616
617// Attribute form encodings.
618HANDLE_DW_FORM(0x01, addr, 2, DWARF)
619HANDLE_DW_FORM(0x03, block2, 2, DWARF)
620HANDLE_DW_FORM(0x04, block4, 2, DWARF)
621HANDLE_DW_FORM(0x05, data2, 2, DWARF)
622HANDLE_DW_FORM(0x06, data4, 2, DWARF)
623HANDLE_DW_FORM(0x07, data8, 2, DWARF)
624HANDLE_DW_FORM(0x08, string, 2, DWARF)
625HANDLE_DW_FORM(0x09, block, 2, DWARF)
626HANDLE_DW_FORM(0x0a, block1, 2, DWARF)
627HANDLE_DW_FORM(0x0b, data1, 2, DWARF)
628HANDLE_DW_FORM(0x0c, flag, 2, DWARF)
629HANDLE_DW_FORM(0x0d, sdata, 2, DWARF)
630HANDLE_DW_FORM(0x0e, strp, 2, DWARF)
631HANDLE_DW_FORM(0x0f, udata, 2, DWARF)
632HANDLE_DW_FORM(0x10, ref_addr, 2, DWARF)
633HANDLE_DW_FORM(0x11, ref1, 2, DWARF)
634HANDLE_DW_FORM(0x12, ref2, 2, DWARF)
635HANDLE_DW_FORM(0x13, ref4, 2, DWARF)
636HANDLE_DW_FORM(0x14, ref8, 2, DWARF)
637HANDLE_DW_FORM(0x15, ref_udata, 2, DWARF)
638HANDLE_DW_FORM(0x16, indirect, 2, DWARF)
639// New in DWARF v4:
640HANDLE_DW_FORM(0x17, sec_offset, 4, DWARF)
641HANDLE_DW_FORM(0x18, exprloc, 4, DWARF)
642HANDLE_DW_FORM(0x19, flag_present, 4, DWARF)
643// This was defined out of sequence.
644HANDLE_DW_FORM(0x20, ref_sig8, 4, DWARF)
645// New in DWARF v5:
646HANDLE_DW_FORM(0x1a, strx, 5, DWARF)
647HANDLE_DW_FORM(0x1b, addrx, 5, DWARF)
648HANDLE_DW_FORM(0x1c, ref_sup4, 5, DWARF)
649HANDLE_DW_FORM(0x1d, strp_sup, 5, DWARF)
650HANDLE_DW_FORM(0x1e, data16, 5, DWARF)
651HANDLE_DW_FORM(0x1f, line_strp, 5, DWARF)
652HANDLE_DW_FORM(0x21, implicit_const, 5, DWARF)
653HANDLE_DW_FORM(0x22, loclistx, 5, DWARF)
654HANDLE_DW_FORM(0x23, rnglistx, 5, DWARF)
655HANDLE_DW_FORM(0x24, ref_sup8, 5, DWARF)
656HANDLE_DW_FORM(0x25, strx1, 5, DWARF)
657HANDLE_DW_FORM(0x26, strx2, 5, DWARF)
658HANDLE_DW_FORM(0x27, strx3, 5, DWARF)
659HANDLE_DW_FORM(0x28, strx4, 5, DWARF)
660HANDLE_DW_FORM(0x29, addrx1, 5, DWARF)
661HANDLE_DW_FORM(0x2a, addrx2, 5, DWARF)
662HANDLE_DW_FORM(0x2b, addrx3, 5, DWARF)
663HANDLE_DW_FORM(0x2c, addrx4, 5, DWARF)
664// Extensions for Fission proposal
665HANDLE_DW_FORM(0x1f01, GNU_addr_index, 0, GNU)
666HANDLE_DW_FORM(0x1f02, GNU_str_index, 0, GNU)
667// Alternate debug sections proposal (output of "dwz" tool).
668HANDLE_DW_FORM(0x1f20, GNU_ref_alt, 0, GNU)
669HANDLE_DW_FORM(0x1f21, GNU_strp_alt, 0, GNU)
670// LLVM addr+offset extension
671HANDLE_DW_FORM(0x2001, LLVM_addrx_offset, 0, LLVM)
672
673// DWARF Expression operators.
674HANDLE_DW_OP(0x03, addr, 2, DWARF)
675HANDLE_DW_OP(0x06, deref, 2, DWARF)
676HANDLE_DW_OP(0x08, const1u, 2, DWARF)
677HANDLE_DW_OP(0x09, const1s, 2, DWARF)
678HANDLE_DW_OP(0x0a, const2u, 2, DWARF)
679HANDLE_DW_OP(0x0b, const2s, 2, DWARF)
680HANDLE_DW_OP(0x0c, const4u, 2, DWARF)
681HANDLE_DW_OP(0x0d, const4s, 2, DWARF)
682HANDLE_DW_OP(0x0e, const8u, 2, DWARF)
683HANDLE_DW_OP(0x0f, const8s, 2, DWARF)
684HANDLE_DW_OP(0x10, constu, 2, DWARF)
685HANDLE_DW_OP(0x11, consts, 2, DWARF)
686HANDLE_DW_OP(0x12, dup, 2, DWARF)
687HANDLE_DW_OP(0x13, drop, 2, DWARF)
688HANDLE_DW_OP(0x14, over, 2, DWARF)
689HANDLE_DW_OP(0x15, pick, 2, DWARF)
690HANDLE_DW_OP(0x16, swap, 2, DWARF)
691HANDLE_DW_OP(0x17, rot, 2, DWARF)
692HANDLE_DW_OP(0x18, xderef, 2, DWARF)
693HANDLE_DW_OP(0x19, abs, 2, DWARF)
694HANDLE_DW_OP(0x1a, and, 2, DWARF)
695HANDLE_DW_OP(0x1b, div, 2, DWARF)
696HANDLE_DW_OP(0x1c, minus, 2, DWARF)
697HANDLE_DW_OP(0x1d, mod, 2, DWARF)
698HANDLE_DW_OP(0x1e, mul, 2, DWARF)
699HANDLE_DW_OP(0x1f, neg, 2, DWARF)
700HANDLE_DW_OP(0x20, not, 2, DWARF)
701HANDLE_DW_OP(0x21, or, 2, DWARF)
702HANDLE_DW_OP(0x22, plus, 2, DWARF)
703HANDLE_DW_OP(0x23, plus_uconst, 2, DWARF)
704HANDLE_DW_OP(0x24, shl, 2, DWARF)
705HANDLE_DW_OP(0x25, shr, 2, DWARF)
706HANDLE_DW_OP(0x26, shra, 2, DWARF)
707HANDLE_DW_OP(0x27, xor, 2, DWARF)
708HANDLE_DW_OP(0x28, bra, 2, DWARF)
709HANDLE_DW_OP(0x29, eq, 2, DWARF)
710HANDLE_DW_OP(0x2a, ge, 2, DWARF)
711HANDLE_DW_OP(0x2b, gt, 2, DWARF)
712HANDLE_DW_OP(0x2c, le, 2, DWARF)
713HANDLE_DW_OP(0x2d, lt, 2, DWARF)
714HANDLE_DW_OP(0x2e, ne, 2, DWARF)
715HANDLE_DW_OP(0x2f, skip, 2, DWARF)
716HANDLE_DW_OP(0x30, lit0, 2, DWARF)
717HANDLE_DW_OP(0x31, lit1, 2, DWARF)
718HANDLE_DW_OP(0x32, lit2, 2, DWARF)
719HANDLE_DW_OP(0x33, lit3, 2, DWARF)
720HANDLE_DW_OP(0x34, lit4, 2, DWARF)
721HANDLE_DW_OP(0x35, lit5, 2, DWARF)
722HANDLE_DW_OP(0x36, lit6, 2, DWARF)
723HANDLE_DW_OP(0x37, lit7, 2, DWARF)
724HANDLE_DW_OP(0x38, lit8, 2, DWARF)
725HANDLE_DW_OP(0x39, lit9, 2, DWARF)
726HANDLE_DW_OP(0x3a, lit10, 2, DWARF)
727HANDLE_DW_OP(0x3b, lit11, 2, DWARF)
728HANDLE_DW_OP(0x3c, lit12, 2, DWARF)
729HANDLE_DW_OP(0x3d, lit13, 2, DWARF)
730HANDLE_DW_OP(0x3e, lit14, 2, DWARF)
731HANDLE_DW_OP(0x3f, lit15, 2, DWARF)
732HANDLE_DW_OP(0x40, lit16, 2, DWARF)
733HANDLE_DW_OP(0x41, lit17, 2, DWARF)
734HANDLE_DW_OP(0x42, lit18, 2, DWARF)
735HANDLE_DW_OP(0x43, lit19, 2, DWARF)
736HANDLE_DW_OP(0x44, lit20, 2, DWARF)
737HANDLE_DW_OP(0x45, lit21, 2, DWARF)
738HANDLE_DW_OP(0x46, lit22, 2, DWARF)
739HANDLE_DW_OP(0x47, lit23, 2, DWARF)
740HANDLE_DW_OP(0x48, lit24, 2, DWARF)
741HANDLE_DW_OP(0x49, lit25, 2, DWARF)
742HANDLE_DW_OP(0x4a, lit26, 2, DWARF)
743HANDLE_DW_OP(0x4b, lit27, 2, DWARF)
744HANDLE_DW_OP(0x4c, lit28, 2, DWARF)
745HANDLE_DW_OP(0x4d, lit29, 2, DWARF)
746HANDLE_DW_OP(0x4e, lit30, 2, DWARF)
747HANDLE_DW_OP(0x4f, lit31, 2, DWARF)
748HANDLE_DW_OP(0x50, reg0, 2, DWARF)
749HANDLE_DW_OP(0x51, reg1, 2, DWARF)
750HANDLE_DW_OP(0x52, reg2, 2, DWARF)
751HANDLE_DW_OP(0x53, reg3, 2, DWARF)
752HANDLE_DW_OP(0x54, reg4, 2, DWARF)
753HANDLE_DW_OP(0x55, reg5, 2, DWARF)
754HANDLE_DW_OP(0x56, reg6, 2, DWARF)
755HANDLE_DW_OP(0x57, reg7, 2, DWARF)
756HANDLE_DW_OP(0x58, reg8, 2, DWARF)
757HANDLE_DW_OP(0x59, reg9, 2, DWARF)
758HANDLE_DW_OP(0x5a, reg10, 2, DWARF)
759HANDLE_DW_OP(0x5b, reg11, 2, DWARF)
760HANDLE_DW_OP(0x5c, reg12, 2, DWARF)
761HANDLE_DW_OP(0x5d, reg13, 2, DWARF)
762HANDLE_DW_OP(0x5e, reg14, 2, DWARF)
763HANDLE_DW_OP(0x5f, reg15, 2, DWARF)
764HANDLE_DW_OP(0x60, reg16, 2, DWARF)
765HANDLE_DW_OP(0x61, reg17, 2, DWARF)
766HANDLE_DW_OP(0x62, reg18, 2, DWARF)
767HANDLE_DW_OP(0x63, reg19, 2, DWARF)
768HANDLE_DW_OP(0x64, reg20, 2, DWARF)
769HANDLE_DW_OP(0x65, reg21, 2, DWARF)
770HANDLE_DW_OP(0x66, reg22, 2, DWARF)
771HANDLE_DW_OP(0x67, reg23, 2, DWARF)
772HANDLE_DW_OP(0x68, reg24, 2, DWARF)
773HANDLE_DW_OP(0x69, reg25, 2, DWARF)
774HANDLE_DW_OP(0x6a, reg26, 2, DWARF)
775HANDLE_DW_OP(0x6b, reg27, 2, DWARF)
776HANDLE_DW_OP(0x6c, reg28, 2, DWARF)
777HANDLE_DW_OP(0x6d, reg29, 2, DWARF)
778HANDLE_DW_OP(0x6e, reg30, 2, DWARF)
779HANDLE_DW_OP(0x6f, reg31, 2, DWARF)
780HANDLE_DW_OP(0x70, breg0, 2, DWARF)
781HANDLE_DW_OP(0x71, breg1, 2, DWARF)
782HANDLE_DW_OP(0x72, breg2, 2, DWARF)
783HANDLE_DW_OP(0x73, breg3, 2, DWARF)
784HANDLE_DW_OP(0x74, breg4, 2, DWARF)
785HANDLE_DW_OP(0x75, breg5, 2, DWARF)
786HANDLE_DW_OP(0x76, breg6, 2, DWARF)
787HANDLE_DW_OP(0x77, breg7, 2, DWARF)
788HANDLE_DW_OP(0x78, breg8, 2, DWARF)
789HANDLE_DW_OP(0x79, breg9, 2, DWARF)
790HANDLE_DW_OP(0x7a, breg10, 2, DWARF)
791HANDLE_DW_OP(0x7b, breg11, 2, DWARF)
792HANDLE_DW_OP(0x7c, breg12, 2, DWARF)
793HANDLE_DW_OP(0x7d, breg13, 2, DWARF)
794HANDLE_DW_OP(0x7e, breg14, 2, DWARF)
795HANDLE_DW_OP(0x7f, breg15, 2, DWARF)
796HANDLE_DW_OP(0x80, breg16, 2, DWARF)
797HANDLE_DW_OP(0x81, breg17, 2, DWARF)
798HANDLE_DW_OP(0x82, breg18, 2, DWARF)
799HANDLE_DW_OP(0x83, breg19, 2, DWARF)
800HANDLE_DW_OP(0x84, breg20, 2, DWARF)
801HANDLE_DW_OP(0x85, breg21, 2, DWARF)
802HANDLE_DW_OP(0x86, breg22, 2, DWARF)
803HANDLE_DW_OP(0x87, breg23, 2, DWARF)
804HANDLE_DW_OP(0x88, breg24, 2, DWARF)
805HANDLE_DW_OP(0x89, breg25, 2, DWARF)
806HANDLE_DW_OP(0x8a, breg26, 2, DWARF)
807HANDLE_DW_OP(0x8b, breg27, 2, DWARF)
808HANDLE_DW_OP(0x8c, breg28, 2, DWARF)
809HANDLE_DW_OP(0x8d, breg29, 2, DWARF)
810HANDLE_DW_OP(0x8e, breg30, 2, DWARF)
811HANDLE_DW_OP(0x8f, breg31, 2, DWARF)
812HANDLE_DW_OP(0x90, regx, 2, DWARF)
813HANDLE_DW_OP(0x91, fbreg, 2, DWARF)
814HANDLE_DW_OP(0x92, bregx, 2, DWARF)
815HANDLE_DW_OP(0x93, piece, 2, DWARF)
816HANDLE_DW_OP(0x94, deref_size, 2, DWARF)
817HANDLE_DW_OP(0x95, xderef_size, 2, DWARF)
818HANDLE_DW_OP(0x96, nop, 2, DWARF)
819// New in DWARF v3:
820HANDLE_DW_OP(0x97, push_object_address, 3, DWARF)
821HANDLE_DW_OP(0x98, call2, 3, DWARF)
822HANDLE_DW_OP(0x99, call4, 3, DWARF)
823HANDLE_DW_OP(0x9a, call_ref, 3, DWARF)
824HANDLE_DW_OP(0x9b, form_tls_address, 3, DWARF)
825HANDLE_DW_OP(0x9c, call_frame_cfa, 3, DWARF)
826HANDLE_DW_OP(0x9d, bit_piece, 3, DWARF)
827// New in DWARF v4:
828HANDLE_DW_OP(0x9e, implicit_value, 4, DWARF)
829HANDLE_DW_OP(0x9f, stack_value, 4, DWARF)
830// New in DWARF v5:
831HANDLE_DW_OP(0xa0, implicit_pointer, 5, DWARF)
832HANDLE_DW_OP(0xa1, addrx, 5, DWARF)
833HANDLE_DW_OP(0xa2, constx, 5, DWARF)
834HANDLE_DW_OP(0xa3, entry_value, 5, DWARF)
835HANDLE_DW_OP(0xa4, const_type, 5, DWARF)
836HANDLE_DW_OP(0xa5, regval_type, 5, DWARF)
837HANDLE_DW_OP(0xa6, deref_type, 5, DWARF)
838HANDLE_DW_OP(0xa7, xderef_type, 5, DWARF)
839HANDLE_DW_OP(0xa8, convert, 5, DWARF)
840HANDLE_DW_OP(0xa9, reinterpret, 5, DWARF)
841// Vendor extensions:
842// Extensions for GNU-style thread-local storage.
843HANDLE_DW_OP(0xe0, GNU_push_tls_address, 0, GNU)
844// Conflicting:
845// HANDLE_DW_OP(0xe0, HP_unknown, 0, HP)
846HANDLE_DW_OP(0xe1, HP_is_value, 0, HP)
847HANDLE_DW_OP(0xe2, HP_fltconst4, 0, HP)
848HANDLE_DW_OP(0xe3, HP_fltconst8, 0, HP)
849HANDLE_DW_OP(0xe4, HP_mod_range, 0, HP)
850HANDLE_DW_OP(0xe5, HP_unmod_range, 0, HP)
851HANDLE_DW_OP(0xe6, HP_tls, 0, HP)
852HANDLE_DW_OP(0xe8, INTEL_bit_piece, 0, INTEL)
853
854// Extensions for WebAssembly.
855HANDLE_DW_OP(0xed, WASM_location, 0, WASM)
856HANDLE_DW_OP(0xee, WASM_location_int, 0, WASM)
857// Historic and not implemented in LLVM.
858HANDLE_DW_OP(0xf0, APPLE_uninit, 0, APPLE)
859// The GNU entry value extension.
860HANDLE_DW_OP(0xf3, GNU_entry_value, 0, GNU)
861HANDLE_DW_OP(0xf8, PGI_omp_thread_num, 0, PGI)
862// Extensions for Fission proposal.
863HANDLE_DW_OP(0xfb, GNU_addr_index, 0, GNU)
864HANDLE_DW_OP(0xfc, GNU_const_index, 0, GNU)
865
866// DWARF languages.
867HANDLE_DW_LANG(0x0001, C89, 0, 2, DWARF)
868HANDLE_DW_LANG(0x0002, C, 0, 2, DWARF)
869HANDLE_DW_LANG(0x0003, Ada83, 1, 2, DWARF)
870HANDLE_DW_LANG(0x0004, C_plus_plus, 0, 2, DWARF)
871HANDLE_DW_LANG(0x0005, Cobol74, 1, 2, DWARF)
872HANDLE_DW_LANG(0x0006, Cobol85, 1, 2, DWARF)
873HANDLE_DW_LANG(0x0007, Fortran77, 1, 2, DWARF)
874HANDLE_DW_LANG(0x0008, Fortran90, 1, 2, DWARF)
875HANDLE_DW_LANG(0x0009, Pascal83, 1, 2, DWARF)
876HANDLE_DW_LANG(0x000a, Modula2, 1, 2, DWARF)
877// New in DWARF v3:
878HANDLE_DW_LANG(0x000b, Java, 0, 3, DWARF)
879HANDLE_DW_LANG(0x000c, C99, 0, 3, DWARF)
880HANDLE_DW_LANG(0x000d, Ada95, 1, 3, DWARF)
881HANDLE_DW_LANG(0x000e, Fortran95, 1, 3, DWARF)
882HANDLE_DW_LANG(0x000f, PLI, 1, 3, DWARF)
883HANDLE_DW_LANG(0x0010, ObjC, 0, 3, DWARF)
884HANDLE_DW_LANG(0x0011, ObjC_plus_plus, 0, 3, DWARF)
885HANDLE_DW_LANG(0x0012, UPC, 0, 3, DWARF)
886HANDLE_DW_LANG(0x0013, D, 0, 3, DWARF)
887// New in DWARF v4:
888HANDLE_DW_LANG(0x0014, Python, 0, 4, DWARF)
889// New in DWARF v5:
890HANDLE_DW_LANG(0x0015, OpenCL, 0, 5, DWARF)
891HANDLE_DW_LANG(0x0016, Go, 0, 5, DWARF)
892HANDLE_DW_LANG(0x0017, Modula3, 1, 5, DWARF)
893HANDLE_DW_LANG(0x0018, Haskell, 0, 5, DWARF)
894HANDLE_DW_LANG(0x0019, C_plus_plus_03, 0, 5, DWARF)
895HANDLE_DW_LANG(0x001a, C_plus_plus_11, 0, 5, DWARF)
896HANDLE_DW_LANG(0x001b, OCaml, 0, 5, DWARF)
897HANDLE_DW_LANG(0x001c, Rust, 0, 5, DWARF)
898HANDLE_DW_LANG(0x001d, C11, 0, 5, DWARF)
899HANDLE_DW_LANG(0x001e, Swift, 0, 5, DWARF)
900HANDLE_DW_LANG(0x001f, Julia, 1, 5, DWARF)
901HANDLE_DW_LANG(0x0020, Dylan, 0, 5, DWARF)
902HANDLE_DW_LANG(0x0021, C_plus_plus_14, 0, 5, DWARF)
903HANDLE_DW_LANG(0x0022, Fortran03, 1, 5, DWARF)
904HANDLE_DW_LANG(0x0023, Fortran08, 1, 5, DWARF)
905HANDLE_DW_LANG(0x0024, RenderScript, 0, 5, DWARF)
906HANDLE_DW_LANG(0x0025, BLISS, 0, 5, DWARF)
907// Vendor extensions:
908HANDLE_DW_LANG(0x8001, Mips_Assembler, None, 0, MIPS)
909HANDLE_DW_LANG(0x8e57, GOOGLE_RenderScript, 0, 0, GOOGLE)
910HANDLE_DW_LANG(0xb000, BORLAND_Delphi, 0, 0, BORLAND)
911
912// DWARF attribute type encodings.
913HANDLE_DW_ATE(0x01, address, 2, DWARF)
914HANDLE_DW_ATE(0x02, boolean, 2, DWARF)
915HANDLE_DW_ATE(0x03, complex_float, 2, DWARF)
916HANDLE_DW_ATE(0x04, float, 2, DWARF)
917HANDLE_DW_ATE(0x05, signed, 2, DWARF)
918HANDLE_DW_ATE(0x06, signed_char, 2, DWARF)
919HANDLE_DW_ATE(0x07, unsigned, 2, DWARF)
920HANDLE_DW_ATE(0x08, unsigned_char, 2, DWARF)
921// New in DWARF v3:
922HANDLE_DW_ATE(0x09, imaginary_float, 3, DWARF)
923HANDLE_DW_ATE(0x0a, packed_decimal, 3, DWARF)
924HANDLE_DW_ATE(0x0b, numeric_string, 3, DWARF)
925HANDLE_DW_ATE(0x0c, edited, 3, DWARF)
926HANDLE_DW_ATE(0x0d, signed_fixed, 3, DWARF)
927HANDLE_DW_ATE(0x0e, unsigned_fixed, 3, DWARF)
928HANDLE_DW_ATE(0x0f, decimal_float, 3, DWARF)
929// New in DWARF v4:
930HANDLE_DW_ATE(0x10, UTF, 4, DWARF)
931// New in DWARF v5:
932HANDLE_DW_ATE(0x11, UCS, 5, DWARF)
933HANDLE_DW_ATE(0x12, ASCII, 5, DWARF)
934
935// The version numbers of all vendor extensions >0x80 were guessed.
936// Conflicting:
937// HANDLE_DW_ATE(0x80, ALTIUM_fract, 2, ALTIUM) = DW_ATE_low_user
938// HANDLE_DW_ATE(0x81, ALTIUM_accum, 2, ALTIUM)
939
940HANDLE_DW_ATE(0x81, HP_complex_float, 2, HP)
941HANDLE_DW_ATE(0x82, HP_float128, 2, HP)
942HANDLE_DW_ATE(0x83, HP_complex_float128, 2, HP)
943HANDLE_DW_ATE(0x84, HP_floathpintel, 2, HP)
944HANDLE_DW_ATE(0x85, HP_imaginary_float90, 2, HP)
945HANDLE_DW_ATE(0x86, HP_imaginary_float128, 2, HP)
946// Conflicting:
947// HANDLE_DW_ATE(0x86, SUN_imaginary_float, 2, SUN)
948
949// DWARF attribute endianity
950HANDLE_DW_END(0x00, default)
951HANDLE_DW_END(0x01, big)
952HANDLE_DW_END(0x02, little)
953
954// DWARF virtuality codes.
955HANDLE_DW_VIRTUALITY(0x00, none)
956HANDLE_DW_VIRTUALITY(0x01, virtual)
957HANDLE_DW_VIRTUALITY(0x02, pure_virtual)
958
959// DWARF v5 Defaulted Member Encodings.
960HANDLE_DW_DEFAULTED(0x00, no)
961HANDLE_DW_DEFAULTED(0x01, in_class)
962HANDLE_DW_DEFAULTED(0x02, out_of_class)
963
964// DWARF calling convention codes.
965HANDLE_DW_CC(0x01, normal)
966HANDLE_DW_CC(0x02, program)
967HANDLE_DW_CC(0x03, nocall)
968// New in DWARF v5:
969HANDLE_DW_CC(0x04, pass_by_reference)
970HANDLE_DW_CC(0x05, pass_by_value)
971// Vendor extensions:
972HANDLE_DW_CC(0x40, GNU_renesas_sh)
973HANDLE_DW_CC(0x41, GNU_borland_fastcall_i386)
974HANDLE_DW_CC(0xb0, BORLAND_safecall)
975HANDLE_DW_CC(0xb1, BORLAND_stdcall)
976HANDLE_DW_CC(0xb2, BORLAND_pascal)
977HANDLE_DW_CC(0xb3, BORLAND_msfastcall)
978HANDLE_DW_CC(0xb4, BORLAND_msreturn)
979HANDLE_DW_CC(0xb5, BORLAND_thiscall)
980HANDLE_DW_CC(0xb6, BORLAND_fastcall)
981HANDLE_DW_CC(0xc0, LLVM_vectorcall)
982HANDLE_DW_CC(0xc1, LLVM_Win64)
983HANDLE_DW_CC(0xc2, LLVM_X86_64SysV)
984HANDLE_DW_CC(0xc3, LLVM_AAPCS)
985HANDLE_DW_CC(0xc4, LLVM_AAPCS_VFP)
986HANDLE_DW_CC(0xc5, LLVM_IntelOclBicc)
987HANDLE_DW_CC(0xc6, LLVM_SpirFunction)
988HANDLE_DW_CC(0xc7, LLVM_OpenCLKernel)
989HANDLE_DW_CC(0xc8, LLVM_Swift)
990HANDLE_DW_CC(0xc9, LLVM_PreserveMost)
991HANDLE_DW_CC(0xca, LLVM_PreserveAll)
992HANDLE_DW_CC(0xcb, LLVM_X86RegCall)
993// From GCC source code (include/dwarf2.h): This DW_CC_ value is not currently
994// generated by any toolchain. It is used internally to GDB to indicate OpenCL
995// C functions that have been compiled with the IBM XL C for OpenCL compiler and
996// use a non-platform calling convention for passing OpenCL C vector types.
997HANDLE_DW_CC(0xff, GDB_IBM_OpenCL)
998
999// Line Number Extended Opcode Encodings
1000HANDLE_DW_LNE(0x01, end_sequence)
1001HANDLE_DW_LNE(0x02, set_address)
1002HANDLE_DW_LNE(0x03, define_file)
1003// New in DWARF v4:
1004HANDLE_DW_LNE(0x04, set_discriminator)
1005
1006// Line Number Standard Opcode Encodings.
1007HANDLE_DW_LNS(0x00, extended_op)
1008HANDLE_DW_LNS(0x01, copy)
1009HANDLE_DW_LNS(0x02, advance_pc)
1010HANDLE_DW_LNS(0x03, advance_line)
1011HANDLE_DW_LNS(0x04, set_file)
1012HANDLE_DW_LNS(0x05, set_column)
1013HANDLE_DW_LNS(0x06, negate_stmt)
1014HANDLE_DW_LNS(0x07, set_basic_block)
1015HANDLE_DW_LNS(0x08, const_add_pc)
1016HANDLE_DW_LNS(0x09, fixed_advance_pc)
1017// New in DWARF v3:
1018HANDLE_DW_LNS(0x0a, set_prologue_end)
1019HANDLE_DW_LNS(0x0b, set_epilogue_begin)
1020HANDLE_DW_LNS(0x0c, set_isa)
1021
1022// DWARF v5 Line number header entry format.
1023HANDLE_DW_LNCT(0x01, path)
1024HANDLE_DW_LNCT(0x02, directory_index)
1025HANDLE_DW_LNCT(0x03, timestamp)
1026HANDLE_DW_LNCT(0x04, size)
1027HANDLE_DW_LNCT(0x05, MD5)
1028// A vendor extension until http://dwarfstd.org/ShowIssue.php?issue=180201.1 is
1029// accepted and incorporated into the next DWARF standard.
1030HANDLE_DW_LNCT(0x2001, LLVM_source)
1031
1032// DWARF v5 Macro information.
1033HANDLE_DW_MACRO(0x01, define)
1034HANDLE_DW_MACRO(0x02, undef)
1035HANDLE_DW_MACRO(0x03, start_file)
1036HANDLE_DW_MACRO(0x04, end_file)
1037HANDLE_DW_MACRO(0x05, define_strp)
1038HANDLE_DW_MACRO(0x06, undef_strp)
1039HANDLE_DW_MACRO(0x07, import)
1040HANDLE_DW_MACRO(0x08, define_sup)
1041HANDLE_DW_MACRO(0x09, undef_sup)
1042HANDLE_DW_MACRO(0x0a, import_sup)
1043HANDLE_DW_MACRO(0x0b, define_strx)
1044HANDLE_DW_MACRO(0x0c, undef_strx)
1045
1046// GNU .debug_macro extension.
1047HANDLE_DW_MACRO_GNU(0x01, define)
1048HANDLE_DW_MACRO_GNU(0x02, undef)
1049HANDLE_DW_MACRO_GNU(0x03, start_file)
1050HANDLE_DW_MACRO_GNU(0x04, end_file)
1051HANDLE_DW_MACRO_GNU(0x05, define_indirect)
1052HANDLE_DW_MACRO_GNU(0x06, undef_indirect)
1053HANDLE_DW_MACRO_GNU(0x07, transparent_include)
1054HANDLE_DW_MACRO_GNU(0x08, define_indirect_alt)
1055HANDLE_DW_MACRO_GNU(0x09, undef_indirect_alt)
1056HANDLE_DW_MACRO_GNU(0x0a, transparent_include_alt)
1057
1058// DWARF v5 Macro header flags.
1059HANDLE_MACRO_FLAG(0x01, OFFSET_SIZE)
1060HANDLE_MACRO_FLAG(0x02, DEBUG_LINE_OFFSET)
1061HANDLE_MACRO_FLAG(0x04, OPCODE_OPERANDS_TABLE)
1062
1063// DWARF v5 Range List Entry encoding values.
1064HANDLE_DW_RLE(0x00, end_of_list)
1065HANDLE_DW_RLE(0x01, base_addressx)
1066HANDLE_DW_RLE(0x02, startx_endx)
1067HANDLE_DW_RLE(0x03, startx_length)
1068HANDLE_DW_RLE(0x04, offset_pair)
1069HANDLE_DW_RLE(0x05, base_address)
1070HANDLE_DW_RLE(0x06, start_end)
1071HANDLE_DW_RLE(0x07, start_length)
1072
1073// DWARF v5 Loc List Entry encoding values.
1074HANDLE_DW_LLE(0x00, end_of_list)
1075HANDLE_DW_LLE(0x01, base_addressx)
1076HANDLE_DW_LLE(0x02, startx_endx)
1077HANDLE_DW_LLE(0x03, startx_length)
1078HANDLE_DW_LLE(0x04, offset_pair)
1079HANDLE_DW_LLE(0x05, default_location)
1080HANDLE_DW_LLE(0x06, base_address)
1081HANDLE_DW_LLE(0x07, start_end)
1082HANDLE_DW_LLE(0x08, start_length)
1083
1084// Call frame instruction encodings.
1085HANDLE_DW_CFA(0x00, nop)
1086HANDLE_DW_CFA(0x40, advance_loc)
1087HANDLE_DW_CFA(0x80, offset)
1088HANDLE_DW_CFA(0xc0, restore)
1089HANDLE_DW_CFA(0x01, set_loc)
1090HANDLE_DW_CFA(0x02, advance_loc1)
1091HANDLE_DW_CFA(0x03, advance_loc2)
1092HANDLE_DW_CFA(0x04, advance_loc4)
1093HANDLE_DW_CFA(0x05, offset_extended)
1094HANDLE_DW_CFA(0x06, restore_extended)
1095HANDLE_DW_CFA(0x07, undefined)
1096HANDLE_DW_CFA(0x08, same_value)
1097HANDLE_DW_CFA(0x09, register)
1098HANDLE_DW_CFA(0x0a, remember_state)
1099HANDLE_DW_CFA(0x0b, restore_state)
1100HANDLE_DW_CFA(0x0c, def_cfa)
1101HANDLE_DW_CFA(0x0d, def_cfa_register)
1102HANDLE_DW_CFA(0x0e, def_cfa_offset)
1103// New in DWARF v3:
1104HANDLE_DW_CFA(0x0f, def_cfa_expression)
1105HANDLE_DW_CFA(0x10, expression)
1106HANDLE_DW_CFA(0x11, offset_extended_sf)
1107HANDLE_DW_CFA(0x12, def_cfa_sf)
1108HANDLE_DW_CFA(0x13, def_cfa_offset_sf)
1109HANDLE_DW_CFA(0x14, val_offset)
1110HANDLE_DW_CFA(0x15, val_offset_sf)
1111HANDLE_DW_CFA(0x16, val_expression)
1112// Vendor extensions:
1113HANDLE_DW_CFA_PRED(0x1d, MIPS_advance_loc8, SELECT_MIPS64)
1114HANDLE_DW_CFA_PRED(0x2d, GNU_window_save, SELECT_SPARC)
1115HANDLE_DW_CFA_PRED(0x2d, AARCH64_negate_ra_state, SELECT_AARCH64)
1116HANDLE_DW_CFA_PRED(0x2e, GNU_args_size, SELECT_X86)
1117
1118// Apple Objective-C Property Attributes.
1119// Keep this list in sync with clang's DeclObjCCommon.h
1120// ObjCPropertyAttribute::Kind!
1121HANDLE_DW_APPLE_PROPERTY(0x01, readonly)
1122HANDLE_DW_APPLE_PROPERTY(0x02, getter)
1123HANDLE_DW_APPLE_PROPERTY(0x04, assign)
1124HANDLE_DW_APPLE_PROPERTY(0x08, readwrite)
1125HANDLE_DW_APPLE_PROPERTY(0x10, retain)
1126HANDLE_DW_APPLE_PROPERTY(0x20, copy)
1127HANDLE_DW_APPLE_PROPERTY(0x40, nonatomic)
1128HANDLE_DW_APPLE_PROPERTY(0x80, setter)
1129HANDLE_DW_APPLE_PROPERTY(0x100, atomic)
1130HANDLE_DW_APPLE_PROPERTY(0x200, weak)
1131HANDLE_DW_APPLE_PROPERTY(0x400, strong)
1132HANDLE_DW_APPLE_PROPERTY(0x800, unsafe_unretained)
1133HANDLE_DW_APPLE_PROPERTY(0x1000, nullability)
1134HANDLE_DW_APPLE_PROPERTY(0x2000, null_resettable)
1135HANDLE_DW_APPLE_PROPERTY(0x4000, class)
1136
1137// DWARF v5 Unit Types.
1138HANDLE_DW_UT(0x01, compile)
1139HANDLE_DW_UT(0x02, type)
1140HANDLE_DW_UT(0x03, partial)
1141HANDLE_DW_UT(0x04, skeleton)
1142HANDLE_DW_UT(0x05, split_compile)
1143HANDLE_DW_UT(0x06, split_type)
1144
1145// DWARF section types. (enum name, ELF name, ELF DWO name, cmdline name,
1146// option) Note that these IDs don't mean anything.
1147// TODO: Add Mach-O and COFF names.
1148// Official DWARF sections.
1149HANDLE_DWARF_SECTION(DebugAbbrev, ".debug_abbrev", "debug-abbrev", BoolOption)
1150HANDLE_DWARF_SECTION(DebugAddr, ".debug_addr", "debug-addr", BoolOption)
1151HANDLE_DWARF_SECTION(DebugAranges, ".debug_aranges", "debug-aranges",
1152 BoolOption)
1153HANDLE_DWARF_SECTION(DebugInfo, ".debug_info", "debug-info", OffsetOption)
1154HANDLE_DWARF_SECTION(DebugTypes, ".debug_types", "debug-types", OffsetOption)
1155HANDLE_DWARF_SECTION(DebugLine, ".debug_line", "debug-line", OffsetOption)
1156HANDLE_DWARF_SECTION(DebugLineStr, ".debug_line_str", "debug-line-str",
1157 BoolOption)
1158HANDLE_DWARF_SECTION(DebugLoc, ".debug_loc", "debug-loc", OffsetOption)
1159HANDLE_DWARF_SECTION(DebugLoclists, ".debug_loclists", "debug-loclists",
1160 OffsetOption)
1161HANDLE_DWARF_SECTION(DebugFrame, ".debug_frame", "debug-frame", OffsetOption)
1162HANDLE_DWARF_SECTION(DebugMacro, ".debug_macro", "debug-macro", BoolOption)
1163HANDLE_DWARF_SECTION(DebugNames, ".debug_names", "debug-names", BoolOption)
1164HANDLE_DWARF_SECTION(DebugPubnames, ".debug_pubnames", "debug-pubnames",
1165 BoolOption)
1166HANDLE_DWARF_SECTION(DebugPubtypes, ".debug_pubtypes", "debug-pubtypes",
1167 BoolOption)
1168HANDLE_DWARF_SECTION(DebugGnuPubnames, ".debug_gnu_pubnames",
1169 "debug-gnu-pubnames", BoolOption)
1170HANDLE_DWARF_SECTION(DebugGnuPubtypes, ".debug_gnu_pubtypes",
1171 "debug-gnu-pubtypes", BoolOption)
1172HANDLE_DWARF_SECTION(DebugRanges, ".debug_ranges", "debug-ranges", BoolOption)
1173HANDLE_DWARF_SECTION(DebugRnglists, ".debug_rnglists", "debug-rnglists",
1174 BoolOption)
1175HANDLE_DWARF_SECTION(DebugStr, ".debug_str", "debug-str", BoolOption)
1176HANDLE_DWARF_SECTION(DebugStrOffsets, ".debug_str_offsets", "debug-str-offsets",
1177 BoolOption)
1178HANDLE_DWARF_SECTION(DebugCUIndex, ".debug_cu_index", "debug-cu-index",
1179 BoolOption)
1180HANDLE_DWARF_SECTION(DebugTUIndex, ".debug_tu_index", "debug-tu-index",
1181 BoolOption)
1182// Vendor extensions.
1183HANDLE_DWARF_SECTION(AppleNames, ".apple_names", "apple-names", BoolOption)
1184HANDLE_DWARF_SECTION(AppleTypes, ".apple_types", "apple-types", BoolOption)
1185HANDLE_DWARF_SECTION(AppleNamespaces, ".apple_namespaces", "apple-namespaces",
1186 BoolOption)
1187HANDLE_DWARF_SECTION(AppleObjC, ".apple_objc", "apple-objc", BoolOption)
1188HANDLE_DWARF_SECTION(GdbIndex, ".gdb_index", "gdb-index", BoolOption)
1189
1190HANDLE_DW_IDX(0x01, compile_unit)
1191HANDLE_DW_IDX(0x02, type_unit)
1192HANDLE_DW_IDX(0x03, die_offset)
1193HANDLE_DW_IDX(0x04, parent)
1194HANDLE_DW_IDX(0x05, type_hash)
1195
1196// DWARF package file section identifiers.
1197// DWARFv5, section 7.3.5.3, table 7.1.
1198HANDLE_DW_SECT(1, INFO)
1199HANDLE_DW_SECT(3, ABBREV)
1200HANDLE_DW_SECT(4, LINE)
1201HANDLE_DW_SECT(5, LOCLISTS)
1202HANDLE_DW_SECT(6, STR_OFFSETS)
1203HANDLE_DW_SECT(7, MACRO)
1204HANDLE_DW_SECT(8, RNGLISTS)
1205
1206#undef HANDLE_DW_TAG
1207#undef HANDLE_DW_AT
1208#undef HANDLE_DW_FORM
1209#undef HANDLE_DW_OP
1210#undef HANDLE_DW_LANG
1211#undef HANDLE_DW_ATE
1212#undef HANDLE_DW_VIRTUALITY
1213#undef HANDLE_DW_DEFAULTED
1214#undef HANDLE_DW_CC
1215#undef HANDLE_DW_LNS
1216#undef HANDLE_DW_LNE
1217#undef HANDLE_DW_LNCT
1218#undef HANDLE_DW_MACRO
1219#undef HANDLE_DW_MACRO_GNU
1220#undef HANDLE_MACRO_FLAG
1221#undef HANDLE_DW_RLE
1222#undef HANDLE_DW_LLE
1223#undef HANDLE_DW_CFA
1224#undef HANDLE_DW_CFA_PRED
1225#undef HANDLE_DW_APPLE_PROPERTY
1226#undef HANDLE_DW_UT
1227#undef HANDLE_DWARF_SECTION
1228#undef HANDLE_DW_IDX
1229#undef HANDLE_DW_END
1230#undef HANDLE_DW_SECT
1231