• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1//===- llvm/Support/Dwarf.def - Dwarf definitions ---------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// Macros for running through Dwarf enumerators.
11//
12//===----------------------------------------------------------------------===//
13
14// TODO: Add other DW-based macros.
15#if !(defined HANDLE_DW_TAG || defined HANDLE_DW_OP ||                         \
16      defined HANDLE_DW_LANG || defined HANDLE_DW_ATE ||                       \
17      defined HANDLE_DW_VIRTUALITY)
18#error "Missing macro definition of HANDLE_DW*"
19#endif
20
21#ifndef HANDLE_DW_TAG
22#define HANDLE_DW_TAG(ID, NAME)
23#endif
24
25#ifndef HANDLE_DW_OP
26#define HANDLE_DW_OP(ID, NAME)
27#endif
28
29#ifndef HANDLE_DW_LANG
30#define HANDLE_DW_LANG(ID, NAME)
31#endif
32
33#ifndef HANDLE_DW_ATE
34#define HANDLE_DW_ATE(ID, NAME)
35#endif
36
37#ifndef HANDLE_DW_VIRTUALITY
38#define HANDLE_DW_VIRTUALITY(ID, NAME)
39#endif
40
41HANDLE_DW_TAG(0x0001, array_type)
42HANDLE_DW_TAG(0x0002, class_type)
43HANDLE_DW_TAG(0x0003, entry_point)
44HANDLE_DW_TAG(0x0004, enumeration_type)
45HANDLE_DW_TAG(0x0005, formal_parameter)
46HANDLE_DW_TAG(0x0008, imported_declaration)
47HANDLE_DW_TAG(0x000a, label)
48HANDLE_DW_TAG(0x000b, lexical_block)
49HANDLE_DW_TAG(0x000d, member)
50HANDLE_DW_TAG(0x000f, pointer_type)
51HANDLE_DW_TAG(0x0010, reference_type)
52HANDLE_DW_TAG(0x0011, compile_unit)
53HANDLE_DW_TAG(0x0012, string_type)
54HANDLE_DW_TAG(0x0013, structure_type)
55HANDLE_DW_TAG(0x0015, subroutine_type)
56HANDLE_DW_TAG(0x0016, typedef)
57HANDLE_DW_TAG(0x0017, union_type)
58HANDLE_DW_TAG(0x0018, unspecified_parameters)
59HANDLE_DW_TAG(0x0019, variant)
60HANDLE_DW_TAG(0x001a, common_block)
61HANDLE_DW_TAG(0x001b, common_inclusion)
62HANDLE_DW_TAG(0x001c, inheritance)
63HANDLE_DW_TAG(0x001d, inlined_subroutine)
64HANDLE_DW_TAG(0x001e, module)
65HANDLE_DW_TAG(0x001f, ptr_to_member_type)
66HANDLE_DW_TAG(0x0020, set_type)
67HANDLE_DW_TAG(0x0021, subrange_type)
68HANDLE_DW_TAG(0x0022, with_stmt)
69HANDLE_DW_TAG(0x0023, access_declaration)
70HANDLE_DW_TAG(0x0024, base_type)
71HANDLE_DW_TAG(0x0025, catch_block)
72HANDLE_DW_TAG(0x0026, const_type)
73HANDLE_DW_TAG(0x0027, constant)
74HANDLE_DW_TAG(0x0028, enumerator)
75HANDLE_DW_TAG(0x0029, file_type)
76HANDLE_DW_TAG(0x002a, friend)
77HANDLE_DW_TAG(0x002b, namelist)
78HANDLE_DW_TAG(0x002c, namelist_item)
79HANDLE_DW_TAG(0x002d, packed_type)
80HANDLE_DW_TAG(0x002e, subprogram)
81HANDLE_DW_TAG(0x002f, template_type_parameter)
82HANDLE_DW_TAG(0x0030, template_value_parameter)
83HANDLE_DW_TAG(0x0031, thrown_type)
84HANDLE_DW_TAG(0x0032, try_block)
85HANDLE_DW_TAG(0x0033, variant_part)
86HANDLE_DW_TAG(0x0034, variable)
87HANDLE_DW_TAG(0x0035, volatile_type)
88HANDLE_DW_TAG(0x0036, dwarf_procedure)
89HANDLE_DW_TAG(0x0037, restrict_type)
90HANDLE_DW_TAG(0x0038, interface_type)
91HANDLE_DW_TAG(0x0039, namespace)
92HANDLE_DW_TAG(0x003a, imported_module)
93HANDLE_DW_TAG(0x003b, unspecified_type)
94HANDLE_DW_TAG(0x003c, partial_unit)
95HANDLE_DW_TAG(0x003d, imported_unit)
96HANDLE_DW_TAG(0x003f, condition)
97HANDLE_DW_TAG(0x0040, shared_type)
98HANDLE_DW_TAG(0x0041, type_unit)
99HANDLE_DW_TAG(0x0042, rvalue_reference_type)
100HANDLE_DW_TAG(0x0043, template_alias)
101
102// New in DWARF v5.
103HANDLE_DW_TAG(0x0044, coarray_type)
104HANDLE_DW_TAG(0x0045, generic_subrange)
105HANDLE_DW_TAG(0x0046, dynamic_type)
106
107// User-defined tags.
108HANDLE_DW_TAG(0x4081, MIPS_loop)
109HANDLE_DW_TAG(0x4101, format_label)
110HANDLE_DW_TAG(0x4102, function_template)
111HANDLE_DW_TAG(0x4103, class_template)
112HANDLE_DW_TAG(0x4106, GNU_template_template_param)
113HANDLE_DW_TAG(0x4107, GNU_template_parameter_pack)
114HANDLE_DW_TAG(0x4108, GNU_formal_parameter_pack)
115HANDLE_DW_TAG(0x4200, APPLE_property)
116HANDLE_DW_TAG(0xb000, BORLAND_property)
117HANDLE_DW_TAG(0xb001, BORLAND_Delphi_string)
118HANDLE_DW_TAG(0xb002, BORLAND_Delphi_dynamic_array)
119HANDLE_DW_TAG(0xb003, BORLAND_Delphi_set)
120HANDLE_DW_TAG(0xb004, BORLAND_Delphi_variant)
121
122HANDLE_DW_OP(0x03, addr)
123HANDLE_DW_OP(0x06, deref)
124HANDLE_DW_OP(0x08, const1u)
125HANDLE_DW_OP(0x09, const1s)
126HANDLE_DW_OP(0x0a, const2u)
127HANDLE_DW_OP(0x0b, const2s)
128HANDLE_DW_OP(0x0c, const4u)
129HANDLE_DW_OP(0x0d, const4s)
130HANDLE_DW_OP(0x0e, const8u)
131HANDLE_DW_OP(0x0f, const8s)
132HANDLE_DW_OP(0x10, constu)
133HANDLE_DW_OP(0x11, consts)
134HANDLE_DW_OP(0x12, dup)
135HANDLE_DW_OP(0x13, drop)
136HANDLE_DW_OP(0x14, over)
137HANDLE_DW_OP(0x15, pick)
138HANDLE_DW_OP(0x16, swap)
139HANDLE_DW_OP(0x17, rot)
140HANDLE_DW_OP(0x18, xderef)
141HANDLE_DW_OP(0x19, abs)
142HANDLE_DW_OP(0x1a, and)
143HANDLE_DW_OP(0x1b, div)
144HANDLE_DW_OP(0x1c, minus)
145HANDLE_DW_OP(0x1d, mod)
146HANDLE_DW_OP(0x1e, mul)
147HANDLE_DW_OP(0x1f, neg)
148HANDLE_DW_OP(0x20, not)
149HANDLE_DW_OP(0x21, or )
150HANDLE_DW_OP(0x22, plus)
151HANDLE_DW_OP(0x23, plus_uconst)
152HANDLE_DW_OP(0x24, shl)
153HANDLE_DW_OP(0x25, shr)
154HANDLE_DW_OP(0x26, shra)
155HANDLE_DW_OP(0x27, xor)
156HANDLE_DW_OP(0x2f, skip)
157HANDLE_DW_OP(0x28, bra)
158HANDLE_DW_OP(0x29, eq)
159HANDLE_DW_OP(0x2a, ge)
160HANDLE_DW_OP(0x2b, gt)
161HANDLE_DW_OP(0x2c, le)
162HANDLE_DW_OP(0x2d, lt)
163HANDLE_DW_OP(0x2e, ne)
164HANDLE_DW_OP(0x30, lit0)
165HANDLE_DW_OP(0x31, lit1)
166HANDLE_DW_OP(0x32, lit2)
167HANDLE_DW_OP(0x33, lit3)
168HANDLE_DW_OP(0x34, lit4)
169HANDLE_DW_OP(0x35, lit5)
170HANDLE_DW_OP(0x36, lit6)
171HANDLE_DW_OP(0x37, lit7)
172HANDLE_DW_OP(0x38, lit8)
173HANDLE_DW_OP(0x39, lit9)
174HANDLE_DW_OP(0x3a, lit10)
175HANDLE_DW_OP(0x3b, lit11)
176HANDLE_DW_OP(0x3c, lit12)
177HANDLE_DW_OP(0x3d, lit13)
178HANDLE_DW_OP(0x3e, lit14)
179HANDLE_DW_OP(0x3f, lit15)
180HANDLE_DW_OP(0x40, lit16)
181HANDLE_DW_OP(0x41, lit17)
182HANDLE_DW_OP(0x42, lit18)
183HANDLE_DW_OP(0x43, lit19)
184HANDLE_DW_OP(0x44, lit20)
185HANDLE_DW_OP(0x45, lit21)
186HANDLE_DW_OP(0x46, lit22)
187HANDLE_DW_OP(0x47, lit23)
188HANDLE_DW_OP(0x48, lit24)
189HANDLE_DW_OP(0x49, lit25)
190HANDLE_DW_OP(0x4a, lit26)
191HANDLE_DW_OP(0x4b, lit27)
192HANDLE_DW_OP(0x4c, lit28)
193HANDLE_DW_OP(0x4d, lit29)
194HANDLE_DW_OP(0x4e, lit30)
195HANDLE_DW_OP(0x4f, lit31)
196HANDLE_DW_OP(0x50, reg0)
197HANDLE_DW_OP(0x51, reg1)
198HANDLE_DW_OP(0x52, reg2)
199HANDLE_DW_OP(0x53, reg3)
200HANDLE_DW_OP(0x54, reg4)
201HANDLE_DW_OP(0x55, reg5)
202HANDLE_DW_OP(0x56, reg6)
203HANDLE_DW_OP(0x57, reg7)
204HANDLE_DW_OP(0x58, reg8)
205HANDLE_DW_OP(0x59, reg9)
206HANDLE_DW_OP(0x5a, reg10)
207HANDLE_DW_OP(0x5b, reg11)
208HANDLE_DW_OP(0x5c, reg12)
209HANDLE_DW_OP(0x5d, reg13)
210HANDLE_DW_OP(0x5e, reg14)
211HANDLE_DW_OP(0x5f, reg15)
212HANDLE_DW_OP(0x60, reg16)
213HANDLE_DW_OP(0x61, reg17)
214HANDLE_DW_OP(0x62, reg18)
215HANDLE_DW_OP(0x63, reg19)
216HANDLE_DW_OP(0x64, reg20)
217HANDLE_DW_OP(0x65, reg21)
218HANDLE_DW_OP(0x66, reg22)
219HANDLE_DW_OP(0x67, reg23)
220HANDLE_DW_OP(0x68, reg24)
221HANDLE_DW_OP(0x69, reg25)
222HANDLE_DW_OP(0x6a, reg26)
223HANDLE_DW_OP(0x6b, reg27)
224HANDLE_DW_OP(0x6c, reg28)
225HANDLE_DW_OP(0x6d, reg29)
226HANDLE_DW_OP(0x6e, reg30)
227HANDLE_DW_OP(0x6f, reg31)
228HANDLE_DW_OP(0x70, breg0)
229HANDLE_DW_OP(0x71, breg1)
230HANDLE_DW_OP(0x72, breg2)
231HANDLE_DW_OP(0x73, breg3)
232HANDLE_DW_OP(0x74, breg4)
233HANDLE_DW_OP(0x75, breg5)
234HANDLE_DW_OP(0x76, breg6)
235HANDLE_DW_OP(0x77, breg7)
236HANDLE_DW_OP(0x78, breg8)
237HANDLE_DW_OP(0x79, breg9)
238HANDLE_DW_OP(0x7a, breg10)
239HANDLE_DW_OP(0x7b, breg11)
240HANDLE_DW_OP(0x7c, breg12)
241HANDLE_DW_OP(0x7d, breg13)
242HANDLE_DW_OP(0x7e, breg14)
243HANDLE_DW_OP(0x7f, breg15)
244HANDLE_DW_OP(0x80, breg16)
245HANDLE_DW_OP(0x81, breg17)
246HANDLE_DW_OP(0x82, breg18)
247HANDLE_DW_OP(0x83, breg19)
248HANDLE_DW_OP(0x84, breg20)
249HANDLE_DW_OP(0x85, breg21)
250HANDLE_DW_OP(0x86, breg22)
251HANDLE_DW_OP(0x87, breg23)
252HANDLE_DW_OP(0x88, breg24)
253HANDLE_DW_OP(0x89, breg25)
254HANDLE_DW_OP(0x8a, breg26)
255HANDLE_DW_OP(0x8b, breg27)
256HANDLE_DW_OP(0x8c, breg28)
257HANDLE_DW_OP(0x8d, breg29)
258HANDLE_DW_OP(0x8e, breg30)
259HANDLE_DW_OP(0x8f, breg31)
260HANDLE_DW_OP(0x90, regx)
261HANDLE_DW_OP(0x91, fbreg)
262HANDLE_DW_OP(0x92, bregx)
263HANDLE_DW_OP(0x93, piece)
264HANDLE_DW_OP(0x94, deref_size)
265HANDLE_DW_OP(0x95, xderef_size)
266HANDLE_DW_OP(0x96, nop)
267HANDLE_DW_OP(0x97, push_object_address)
268HANDLE_DW_OP(0x98, call2)
269HANDLE_DW_OP(0x99, call4)
270HANDLE_DW_OP(0x9a, call_ref)
271HANDLE_DW_OP(0x9b, form_tls_address)
272HANDLE_DW_OP(0x9c, call_frame_cfa)
273HANDLE_DW_OP(0x9d, bit_piece)
274HANDLE_DW_OP(0x9e, implicit_value)
275HANDLE_DW_OP(0x9f, stack_value)
276
277// Extensions for GNU-style thread-local storage.
278HANDLE_DW_OP(0xe0, GNU_push_tls_address)
279
280// Extensions for Fission proposal.
281HANDLE_DW_OP(0xfb, GNU_addr_index)
282HANDLE_DW_OP(0xfc, GNU_const_index)
283
284// DWARF languages.
285HANDLE_DW_LANG(0x0001, C89)
286HANDLE_DW_LANG(0x0002, C)
287HANDLE_DW_LANG(0x0003, Ada83)
288HANDLE_DW_LANG(0x0004, C_plus_plus)
289HANDLE_DW_LANG(0x0005, Cobol74)
290HANDLE_DW_LANG(0x0006, Cobol85)
291HANDLE_DW_LANG(0x0007, Fortran77)
292HANDLE_DW_LANG(0x0008, Fortran90)
293HANDLE_DW_LANG(0x0009, Pascal83)
294HANDLE_DW_LANG(0x000a, Modula2)
295HANDLE_DW_LANG(0x000b, Java)
296HANDLE_DW_LANG(0x000c, C99)
297HANDLE_DW_LANG(0x000d, Ada95)
298HANDLE_DW_LANG(0x000e, Fortran95)
299HANDLE_DW_LANG(0x000f, PLI)
300HANDLE_DW_LANG(0x0010, ObjC)
301HANDLE_DW_LANG(0x0011, ObjC_plus_plus)
302HANDLE_DW_LANG(0x0012, UPC)
303HANDLE_DW_LANG(0x0013, D)
304
305// New in DWARF 5:
306HANDLE_DW_LANG(0x0014, Python)
307HANDLE_DW_LANG(0x0015, OpenCL)
308HANDLE_DW_LANG(0x0016, Go)
309HANDLE_DW_LANG(0x0017, Modula3)
310HANDLE_DW_LANG(0x0018, Haskell)
311HANDLE_DW_LANG(0x0019, C_plus_plus_03)
312HANDLE_DW_LANG(0x001a, C_plus_plus_11)
313HANDLE_DW_LANG(0x001b, OCaml)
314HANDLE_DW_LANG(0x001c, Rust)
315HANDLE_DW_LANG(0x001d, C11)
316HANDLE_DW_LANG(0x001e, Swift)
317HANDLE_DW_LANG(0x001f, Julia)
318HANDLE_DW_LANG(0x0020, Dylan)
319HANDLE_DW_LANG(0x0021, C_plus_plus_14)
320HANDLE_DW_LANG(0x0022, Fortran03)
321HANDLE_DW_LANG(0x0023, Fortran08)
322HANDLE_DW_LANG(0x8001, Mips_Assembler)
323HANDLE_DW_LANG(0xb000, BORLAND_Delphi)
324
325// DWARF attribute type encodings.
326HANDLE_DW_ATE(0x01, address)
327HANDLE_DW_ATE(0x02, boolean)
328HANDLE_DW_ATE(0x03, complex_float)
329HANDLE_DW_ATE(0x04, float)
330HANDLE_DW_ATE(0x05, signed)
331HANDLE_DW_ATE(0x06, signed_char)
332HANDLE_DW_ATE(0x07, unsigned)
333HANDLE_DW_ATE(0x08, unsigned_char)
334HANDLE_DW_ATE(0x09, imaginary_float)
335HANDLE_DW_ATE(0x0a, packed_decimal)
336HANDLE_DW_ATE(0x0b, numeric_string)
337HANDLE_DW_ATE(0x0c, edited)
338HANDLE_DW_ATE(0x0d, signed_fixed)
339HANDLE_DW_ATE(0x0e, unsigned_fixed)
340HANDLE_DW_ATE(0x0f, decimal_float)
341HANDLE_DW_ATE(0x10, UTF)
342
343// DWARF virtuality codes.
344HANDLE_DW_VIRTUALITY(0x00, none)
345HANDLE_DW_VIRTUALITY(0x01, virtual)
346HANDLE_DW_VIRTUALITY(0x02, pure_virtual)
347
348#undef HANDLE_DW_TAG
349#undef HANDLE_DW_OP
350#undef HANDLE_DW_LANG
351#undef HANDLE_DW_ATE
352#undef HANDLE_DW_VIRTUALITY
353