/usr/include/libr/r_bin_dwarf.h is in libradare2-dev 0.9.6-3.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | #ifndef _INCLUDE_BIN_DWARF_H_
#define _INCLUDE_BIN_DWARF_H_
#ifdef __cplusplus
extern "C" {
#endif
#define DW_EXTENDED_OPCODE 0
#define LOP_EXTENDED 1
#define LOP_DISCARD 2
#define LOP_STANDARD 3
#define LOP_SPECIAL 4
#define DW_LNS_copy 0x01
#define DW_LNS_advance_pc 0x02
#define DW_LNS_advance_line 0x03
#define DW_LNS_set_file 0x04
#define DW_LNS_set_column 0x05
#define DW_LNS_negate_stmt 0x06
#define DW_LNS_set_basic_block 0x07
#define DW_LNS_const_add_pc 0x08
#define DW_LNS_fixed_advance_pc 0x09
#define DW_LNS_set_prologue_end 0x0a /* DWARF3 */
#define DW_LNS_set_epilogue_begin 0x0b /* DWARF3 */
#define DW_LNS_set_isa 0x0c /* DWARF3 */
/* Line number extended opcode name. */
#define DW_LNE_end_sequence 0x01
#define DW_LNE_set_address 0x02
#define DW_LNE_define_file 0x03
#define DW_LNE_set_discriminator 0x04 /* DWARF4 */
/* HP extensions. */
#define DW_LNE_HP_negate_is_UV_update 0x11 /* 17 HP */
#define DW_LNE_HP_push_context 0x12 /* 18 HP */
#define DW_LNE_HP_pop_context 0x13 /* 19 HP */
#define DW_LNE_HP_set_file_line_column 0x14 /* 20 HP */
#define DW_LNE_HP_set_routine_name 0x15 /* 21 HP */
#define DW_LNE_HP_set_sequence 0x16 /* 22 HP */
#define DW_LNE_HP_negate_post_semantics 0x17 /* 23 HP */
#define DW_LNE_HP_negate_function_exit 0x18 /* 24 HP */
#define DW_LNE_HP_negate_front_end_logical 0x19 /* 25 HP */
#define DW_LNE_HP_define_proc 0x20 /* 32 HP */
#define DW_LNE_lo_user 0x80 /* DWARF3 */
#define DW_LNE_hi_user 0xff /* DWARF3 */
/* debug_info tags */
#define DW_TAG_array_type 0x01
#define DW_TAG_class_type 0x02
#define DW_TAG_entry_point 0x03
#define DW_TAG_enumeration_type 0x04
#define DW_TAG_formal_parameter 0x05
#define DW_TAG_imported_declaration 0x08
#define DW_TAG_label 0x0a
#define DW_TAG_lexical_block 0x0b
#define DW_TAG_member 0x0d
#define DW_TAG_pointer_type 0x0f
#define DW_TAG_reference_type 0x10
#define DW_TAG_compile_unit 0x11 //
#define DW_TAG_string_type 0x12
#define DW_TAG_structure_type 0x13
#define DW_TAG_subroutine_type 0x15
#define DW_TAG_typedef 0x16
#define DW_TAG_union_type 0x17
#define DW_TAG_unspecified_parameters 0x18
#define DW_TAG_variant 0x19
#define DW_TAG_common_block 0x1a
#define DW_TAG_common_inclusion 0x1b
#define DW_TAG_inheritance 0x1c
#define DW_TAG_inlined_subroutine 0x1d
#define DW_TAG_module 0x1e
#define DW_TAG_ptr_to_member_type 0x1f
#define DW_TAG_set_type 0x20
#define DW_TAG_subrange_type 0x21
#define DW_TAG_with_stmt 0x22
#define DW_TAG_access_declaration 0x23
#define DW_TAG_base_type 0x24
#define DW_TAG_catch_block 0x25
#define DW_TAG_const_type 0x26
#define DW_TAG_constant 0x27
#define DW_TAG_enumerator 0x28
#define DW_TAG_file_type 0x29
#define DW_TAG_friend 0x2a
#define DW_TAG_namelist 0x2b
/* Early releases of this header had the following
misspelled with a trailing 's' */
#define DW_TAG_namelist_item 0x2c /* DWARF3/2 spelling */
#define DW_TAG_namelist_items 0x2c /* SGI misspelling/typo */
#define DW_TAG_packed_type 0x2d
#define DW_TAG_subprogram 0x2e
/* The DWARF2 document had two spellings of the following
two TAGs, DWARF3 specifies the longer spelling. */
#define DW_TAG_template_type_parameter 0x2f /* DWARF3/2 spelling*/
#define DW_TAG_template_type_param 0x2f /* DWARF2 spelling*/
#define DW_TAG_template_value_parameter 0x30 /* DWARF3/2 spelling*/
#define DW_TAG_template_value_param 0x30 /* DWARF2 spelling*/
#define DW_TAG_thrown_type 0x31
#define DW_TAG_try_block 0x32
#define DW_TAG_variant_part 0x33
#define DW_TAG_variable 0x34
#define DW_TAG_volatile_type 0x35
#define DW_TAG_dwarf_procedure 0x36 /* DWARF3 */
#define DW_TAG_restrict_type 0x37 /* DWARF3 */
#define DW_TAG_interface_type 0x38 /* DWARF3 */
#define DW_TAG_namespace 0x39 /* DWARF3 */
#define DW_TAG_imported_module 0x3a /* DWARF3 */
#define DW_TAG_unspecified_type 0x3b /* DWARF3 */
#define DW_TAG_partial_unit 0x3c /* DWARF3 */
#define DW_TAG_imported_unit 0x3d /* DWARF3 */
/* Do not use DW_TAG_mutable_type */
#define DW_TAG_mutable_type 0x3e /* Withdrawn from DWARF3 by DWARF3f. */
#define DW_TAG_condition 0x3f /* DWARF3f */
#define DW_TAG_shared_type 0x40 /* DWARF3f */
#define DW_TAG_type_unit 0x41 /* DWARF4 */
#define DW_TAG_rvalue_reference_type 0x42 /* DWARF4 */
#define DW_TAG_template_alias 0x43 /* DWARF4 */
typedef struct {
ut32 total_length;
ut16 version;
ut32 plen;
ut8 mininstlen;
ut8 is_stmt;
char line_base;
ut8 line_range;
ut8 opcode_base;
ut32 oplentable[12];
const char **incdirs;
const char *file[128];
//RBinDwarfInfoHeader
} RBinDwarfInfoHeader;
#define R_BIN_DWARF_INFO_HEADER_FILE_LENGTH(x) (sizeof (x->file)/sizeof(*(x->file)))
typedef struct {
ut64 address;
unsigned int file;
unsigned int line;
unsigned int column;
int is_stmt;
int basic_block;
int end_sequence;
} RBinDwarfState;
typedef struct {
ut64 address;
const char *file;
unsigned int line;
unsigned int column;
} RBinDwarfRow;
#define r_bin_dwarf_line_new(o,a,f,l) o->address=a, o->file = strdup (f?f:""), o->line = l, o->column =0,o
R_API int r_bin_dwarf_parse_info_raw(const ut8 *obuf);
#ifdef __cplusplus
}
#endif
#endif
|