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