github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/include/dwarf2.h (about) 1 //===----------------------------- dwarf2.h -------------------------------===// 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 // DWARF constants. Derived from: 8 // - libcxxabi/src/Unwind/dwarf2.h 9 // - DWARF 4 specification 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef DWARF2_H 14 #define DWARF2_H 15 16 enum dwarf_attribute { 17 DW_AT_name = 0x03, 18 DW_AT_stmt_list = 0x10, 19 DW_AT_low_pc = 0x11, 20 DW_AT_high_pc = 0x12, 21 DW_AT_comp_dir = 0x1b, 22 DW_AT_abstract_origin = 0x31, 23 DW_AT_specification = 0x47, 24 DW_AT_ranges = 0x55, 25 DW_AT_call_file = 0x58, 26 DW_AT_call_line = 0x59, 27 DW_AT_linkage_name = 0x6e, 28 DW_AT_MIPS_linkage_name = 0x2007 29 }; 30 31 enum dwarf_form { 32 DW_FORM_addr = 0x01, 33 DW_FORM_block2 = 0x03, 34 DW_FORM_block4 = 0x04, 35 DW_FORM_data2 = 0x05, 36 DW_FORM_data4 = 0x06, 37 DW_FORM_data8 = 0x07, 38 DW_FORM_string = 0x08, 39 DW_FORM_block = 0x09, 40 DW_FORM_block1 = 0x0a, 41 DW_FORM_data1 = 0x0b, 42 DW_FORM_flag = 0x0c, 43 DW_FORM_sdata = 0x0d, 44 DW_FORM_strp = 0x0e, 45 DW_FORM_udata = 0x0f, 46 DW_FORM_ref_addr = 0x10, 47 DW_FORM_ref1 = 0x11, 48 DW_FORM_ref2 = 0x12, 49 DW_FORM_ref4 = 0x13, 50 DW_FORM_ref8 = 0x14, 51 DW_FORM_ref_udata = 0x15, 52 DW_FORM_indirect = 0x16, 53 DW_FORM_sec_offset = 0x17, 54 DW_FORM_exprloc = 0x18, 55 DW_FORM_flag_present = 0x19, 56 DW_FORM_ref_sig8 = 0x20, 57 DW_FORM_GNU_addr_index = 0x1f01, 58 DW_FORM_GNU_str_index = 0x1f02, 59 DW_FORM_GNU_ref_alt = 0x1f20, 60 DW_FORM_GNU_strp_alt = 0x1f21 61 }; 62 63 enum dwarf_tag { 64 DW_TAG_entry_point = 0x03, 65 DW_TAG_compile_unit = 0x11, 66 DW_TAG_inlined_subroutine = 0x1d, 67 DW_TAG_subprogram = 0x2e 68 }; 69 70 enum dwarf_lns { 71 DW_LNS_extended_op = 0x00, 72 DW_LNS_copy = 0x01, 73 DW_LNS_advance_pc = 0x02, 74 DW_LNS_advance_line = 0x03, 75 DW_LNS_set_file = 0x04, 76 DW_LNS_set_column = 0x05, 77 DW_LNS_negate_stmt = 0x06, 78 DW_LNS_set_basic_block = 0x07, 79 DW_LNS_const_add_pc = 0x08, 80 DW_LNS_fixed_advance_pc = 0x09, 81 DW_LNS_set_prologue_end = 0x0a, 82 DW_LNS_set_epilogue_begin = 0x0b, 83 DW_LNS_set_isa = 0x0c 84 }; 85 86 enum dwarf_lne { 87 DW_LNE_end_sequence = 0x01, 88 DW_LNE_set_address = 0x02, 89 DW_LNE_define_file = 0x03, 90 DW_LNE_set_discriminator = 0x04 91 }; 92 93 #endif // DWARF2_H