blob: 928822645b6f54adc71c2bde4acfbb6c5db0bc62 [file] [log] [blame]
Peter Collingbournead9841e2014-11-27 00:06:42 +00001//===----------------------------- dwarf2.h -------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is dual licensed under the MIT and the University of Illinois Open
6// Source Licenses. See LICENSE.TXT for details.
7//
8// DWARF constants. Derived from:
9// - libcxxabi/src/Unwind/dwarf2.h
10// - DWARF 4 specification
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef DWARF2_H
15#define DWARF2_H
16
17enum dwarf_attribute {
18 DW_AT_name = 0x03,
19 DW_AT_stmt_list = 0x10,
20 DW_AT_low_pc = 0x11,
21 DW_AT_high_pc = 0x12,
22 DW_AT_comp_dir = 0x1b,
23 DW_AT_abstract_origin = 0x31,
24 DW_AT_specification = 0x47,
25 DW_AT_ranges = 0x55,
26 DW_AT_call_file = 0x58,
27 DW_AT_call_line = 0x59,
28 DW_AT_linkage_name = 0x6e,
29 DW_AT_MIPS_linkage_name = 0x2007
30};
31
32enum dwarf_form {
33 DW_FORM_addr = 0x01,
34 DW_FORM_block2 = 0x03,
35 DW_FORM_block4 = 0x04,
36 DW_FORM_data2 = 0x05,
37 DW_FORM_data4 = 0x06,
38 DW_FORM_data8 = 0x07,
39 DW_FORM_string = 0x08,
40 DW_FORM_block = 0x09,
41 DW_FORM_block1 = 0x0a,
42 DW_FORM_data1 = 0x0b,
43 DW_FORM_flag = 0x0c,
44 DW_FORM_sdata = 0x0d,
45 DW_FORM_strp = 0x0e,
46 DW_FORM_udata = 0x0f,
47 DW_FORM_ref_addr = 0x10,
48 DW_FORM_ref1 = 0x11,
49 DW_FORM_ref2 = 0x12,
50 DW_FORM_ref4 = 0x13,
51 DW_FORM_ref8 = 0x14,
52 DW_FORM_ref_udata = 0x15,
53 DW_FORM_indirect = 0x16,
54 DW_FORM_sec_offset = 0x17,
55 DW_FORM_exprloc = 0x18,
56 DW_FORM_flag_present = 0x19,
57 DW_FORM_ref_sig8 = 0x20,
58 DW_FORM_GNU_addr_index = 0x1f01,
59 DW_FORM_GNU_str_index = 0x1f02,
60 DW_FORM_GNU_ref_alt = 0x1f20,
61 DW_FORM_GNU_strp_alt = 0x1f21
62};
63
64enum dwarf_tag {
65 DW_TAG_entry_point = 0x03,
66 DW_TAG_compile_unit = 0x11,
67 DW_TAG_inlined_subroutine = 0x1d,
68 DW_TAG_subprogram = 0x2e
69};
70
71enum dwarf_lns {
72 DW_LNS_extended_op = 0x00,
73 DW_LNS_copy = 0x01,
74 DW_LNS_advance_pc = 0x02,
75 DW_LNS_advance_line = 0x03,
76 DW_LNS_set_file = 0x04,
77 DW_LNS_set_column = 0x05,
78 DW_LNS_negate_stmt = 0x06,
79 DW_LNS_set_basic_block = 0x07,
80 DW_LNS_const_add_pc = 0x08,
81 DW_LNS_fixed_advance_pc = 0x09,
82 DW_LNS_set_prologue_end = 0x0a,
83 DW_LNS_set_epilogue_begin = 0x0b,
84 DW_LNS_set_isa = 0x0c
85};
86
87enum dwarf_lne {
88 DW_LNE_end_sequence = 0x01,
89 DW_LNE_set_address = 0x02,
90 DW_LNE_define_file = 0x03,
91 DW_LNE_set_discriminator = 0x04
92};
93
94#endif // DWARF2_H