Rizin
unix-like reverse engineering framework and cli tools
cdwarf.c
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: 2021 thestr4ng3r <info@florianmaerkl.de>
2 // SPDX-License-Identifier: LGPL-3.0-only
3 
4 #include <rz_core.h>
5 
7  size_t i, j;
8  if (!da) {
9  return;
10  }
11  for (i = 0; i < da->count; i++) {
12  rz_cons_printf(" %-4" PFMT64d " ", da->decls[i].code);
13  const char *tagname = rz_bin_dwarf_get_tag_name(da->decls[i].tag);
14  if (tagname) {
15  rz_cons_printf(" %-25s ", tagname);
16  }
17  rz_cons_printf("[%s]", da->decls[i].has_children ? "has children" : "no children");
18  rz_cons_printf(" (0x%" PFMT64x ")\n", da->decls[i].offset);
19 
20  if (da->decls[i].defs) {
21  for (j = 0; j < da->decls[i].count; j++) {
22  const char *attr_name = rz_bin_dwarf_get_attr_name(da->decls[i].defs[j].attr_name);
23  const char *attr_form_name = rz_bin_dwarf_get_attr_form_name(da->decls[i].defs[j].attr_form);
24  if (attr_name && attr_form_name) {
25  rz_cons_printf(" %-30s %-30s\n", attr_name, attr_form_name);
26  }
27  }
28  }
29  }
30 }
31 
33  size_t i;
35 
36  switch (val->attr_form) {
37  case DW_FORM_block:
38  case DW_FORM_block1:
39  case DW_FORM_block2:
40  case DW_FORM_block4:
41  case DW_FORM_exprloc:
42  rz_cons_printf("%" PFMT64u " byte block:", val->block.length);
43  for (i = 0; i < val->block.length; i++) {
44  rz_cons_printf(" 0x%02x", val->block.data[i]);
45  }
46  break;
47  case DW_FORM_data1:
48  case DW_FORM_data2:
49  case DW_FORM_data4:
50  case DW_FORM_data8:
51  case DW_FORM_data16:
52  rz_cons_printf("%" PFMT64u "", val->uconstant);
53  if (val->attr_name == DW_AT_language) {
54  const char *lang_name = rz_bin_dwarf_get_lang_name(val->uconstant);
55  if (lang_name) {
56  rz_cons_printf(" (%s)", lang_name);
57  }
58  }
59  break;
60  case DW_FORM_string:
61  if (val->string.content) {
62  rz_cons_printf("%s", val->string.content);
63  } else {
64  rz_cons_print("No string found");
65  }
66  break;
67  case DW_FORM_flag:
68  rz_cons_printf("%u", val->flag);
69  break;
70  case DW_FORM_sdata:
71  rz_cons_printf("%" PFMT64d "", val->sconstant);
72  break;
73  case DW_FORM_udata:
74  rz_cons_printf("%" PFMT64u "", val->uconstant);
75  break;
76  case DW_FORM_ref_addr:
77  case DW_FORM_ref1:
78  case DW_FORM_ref2:
79  case DW_FORM_ref4:
80  case DW_FORM_ref8:
81  case DW_FORM_ref_sig8:
82  case DW_FORM_ref_udata:
83  case DW_FORM_ref_sup4:
84  case DW_FORM_ref_sup8:
85  case DW_FORM_sec_offset:
86  rz_cons_printf("<0x%" PFMT64x ">", val->reference);
87  break;
89  rz_cons_print("1");
90  break;
91  case DW_FORM_strx:
92  case DW_FORM_strx1:
93  case DW_FORM_strx2:
94  case DW_FORM_strx3:
95  case DW_FORM_strx4:
96  case DW_FORM_line_ptr:
97  case DW_FORM_strp_sup:
98  case DW_FORM_strp:
99  rz_cons_printf("(indirect string, offset: 0x%" PFMT64x "): %s",
100  val->string.offset, val->string.content);
101  break;
102  case DW_FORM_addr:
103  case DW_FORM_addrx:
104  case DW_FORM_addrx1:
105  case DW_FORM_addrx2:
106  case DW_FORM_addrx3:
107  case DW_FORM_addrx4:
108  case DW_FORM_loclistx:
109  case DW_FORM_rnglistx:
110  rz_cons_printf("0x%" PFMT64x "", val->address);
111  break;
113  rz_cons_printf("0x%" PFMT64d "", val->uconstant);
114  break;
115  default:
116  rz_cons_printf("Unknown attr value form %" PFMT64d "\n", val->attr_form);
117  break;
118  };
119 }
120 
122  size_t i, j, k;
123  RzBinDwarfDie *dies;
124  RzBinDwarfAttrValue *values;
125 
127 
128  for (i = 0; i < inf->count; i++) {
129  rz_cons_print("\n");
130  rz_cons_printf(" Compilation Unit @ offset 0x%" PFMT64x ":\n", inf->comp_units[i].offset);
131  rz_cons_printf(" Length: 0x%" PFMT64x "\n", inf->comp_units[i].hdr.length);
132  rz_cons_printf(" Version: %d\n", inf->comp_units[i].hdr.version);
133  rz_cons_printf(" Abbrev Offset: 0x%" PFMT64x "\n", inf->comp_units[i].hdr.abbrev_offset);
134  rz_cons_printf(" Pointer Size: %d\n", inf->comp_units[i].hdr.address_size);
135  const char *unit_type_name = rz_bin_dwarf_get_unit_type_name(inf->comp_units[i].hdr.unit_type);
136  if (unit_type_name) {
137  rz_cons_printf(" Unit Type: %s\n", unit_type_name);
138  }
139  rz_cons_print("\n");
140 
141  dies = inf->comp_units[i].dies;
142 
143  for (j = 0; j < inf->comp_units[i].count; j++) {
144  rz_cons_printf("<0x%" PFMT64x ">: Abbrev Number: %-4" PFMT64u " ", dies[j].offset, dies[j].abbrev_code);
145 
146  const char *tag_name = rz_bin_dwarf_get_tag_name(dies[j].tag);
147  if (tag_name) {
148  rz_cons_printf("(%s)\n", tag_name);
149  } else {
150  rz_cons_print("(Unknown abbrev tag)\n");
151  }
152 
153  if (!dies[j].abbrev_code) {
154  continue;
155  }
156  values = dies[j].attr_values;
157 
158  for (k = 0; k < dies[j].count; k++) {
159  if (!values[k].attr_name) {
160  continue;
161  }
162  const char *attr_name = rz_bin_dwarf_get_attr_name(values[k].attr_name);
163  if (attr_name) {
164  rz_cons_printf(" %-25s : ", attr_name);
165  } else {
166  rz_cons_printf(" AT_UNKWN [0x%-3" PFMT64x "]\t : ", values[k].attr_name);
167  }
169  rz_cons_printf("\n");
170  }
171  }
172  }
173 }
174 
175 static int offset_comp(const void *a, const void *b) {
176  const RzBinDwarfLocList *f = a;
177  const RzBinDwarfLocList *s = b;
178  ut64 first = f->offset;
179  ut64 second = s->offset;
180  if (first < second) {
181  return -1;
182  }
183  if (first > second) {
184  return 1;
185  }
186  return 0;
187 }
188 
189 static bool sort_loclists(void *user, const ut64 key, const void *value) {
191  RzList *sort_list = user;
192  rz_list_add_sorted(sort_list, loc_list, offset_comp);
193  return true;
194 }
195 
196 RZ_API void rz_core_bin_dwarf_print_loc(HtUP /*<offset, RzBinDwarfLocList *>*/ *loc_table, int addr_size) {
197  rz_return_if_fail(loc_table);
198  rz_cons_print("\nContents of the .debug_loc section:\n");
199  RzList /*<RzBinDwarfLocList *>*/ *sort_list = rz_list_new();
200  /* sort the table contents by offset and print sorted
201  a bit ugly, but I wanted to decouple the parsing and printing */
202  ht_up_foreach(loc_table, sort_loclists, sort_list);
203  RzListIter *i;
204  RzBinDwarfLocList *loc_list;
205  rz_list_foreach (sort_list, i, loc_list) {
206  RzListIter *j;
208  ut64 base_offset = loc_list->offset;
209  rz_list_foreach (loc_list->list, j, range) {
210  rz_cons_printf("0x%" PFMT64x " 0x%" PFMT64x " 0x%" PFMT64x "\n", base_offset, range->start, range->end);
211  base_offset += addr_size * 2;
212  if (range->expression) {
213  base_offset += 2 + range->expression->length; /* 2 bytes for expr length */
214  }
215  }
216  rz_cons_printf("0x%" PFMT64x " <End of list>\n", base_offset);
217  }
218  rz_cons_print("\n");
219  rz_list_free(sort_list);
220 }
221 
222 RZ_API void rz_core_bin_dwarf_print_aranges(RzList /*<RzBinDwarfARangeSet *>*/ *aranges) {
223  rz_return_if_fail(aranges);
224  rz_cons_print("\nContents of the .debug_aranges section:\n");
225  RzListIter *it;
226  RzBinDwarfARangeSet *set;
227  rz_list_foreach (aranges, it, set) {
228  rz_cons_print(" Address Range Set\n");
229  rz_cons_printf(" Unit Length: 0x%" PFMT64x "\n", set->unit_length);
230  rz_cons_printf(" 64bit: %s\n", rz_str_bool(set->is_64bit));
231  rz_cons_printf(" Version: %u\n", (unsigned int)set->version);
232  rz_cons_printf(" Offset in .debug_info: 0x%" PFMT64x "\n", set->debug_info_offset);
233  rz_cons_printf(" Address Size: %u\n", (unsigned int)set->address_size);
234  rz_cons_printf(" Segment Size: %u\n", (unsigned int)set->segment_size);
235  rz_cons_print(" Ranges:\n");
236  rz_cons_print(" address length\n");
237  for (size_t i = 0; i < set->aranges_count; i++) {
238  rz_cons_printf(" 0x%016" PFMT64x " 0x%016" PFMT64x "\n", set->aranges[i].addr, set->aranges[i].length);
239  }
240  }
241  rz_cons_print("\n");
242 }
243 
248  switch (op->type) {
250  switch (op->opcode) {
251  case DW_LNS_copy:
252  rz_cons_print("Copy");
253  break;
254  case DW_LNS_advance_pc:
255  rz_cons_printf("Advance PC by %" PFMT64u, op->args.advance_pc * hdr->min_inst_len);
256  if (regs) {
257  rz_cons_printf(" to 0x%" PFMT64x, regs->address);
258  }
259  break;
260  case DW_LNS_advance_line:
261  rz_cons_printf("Advance line by %" PFMT64d, op->args.advance_line);
262  if (regs) {
263  rz_cons_printf(", to %" PFMT64d, regs->line);
264  }
265  break;
266  case DW_LNS_set_file:
267  rz_cons_printf("Set file to %" PFMT64d, op->args.set_file);
268  break;
269  case DW_LNS_set_column:
270  rz_cons_printf("Set column to %" PFMT64d, op->args.set_column);
271  break;
272  case DW_LNS_negate_stmt:
273  if (regs) {
274  rz_cons_printf("Set is_stmt to %u", (unsigned int)regs->is_stmt);
275  } else {
276  rz_cons_print("Negate is_stmt");
277  }
278  break;
280  rz_cons_print("set_basic_block");
281  break;
282  case DW_LNS_const_add_pc:
283  rz_cons_printf("Advance PC by constant %" PFMT64u, rz_bin_dwarf_line_header_get_spec_op_advance_pc(hdr, 255));
284  if (regs) {
285  rz_cons_printf(" to 0x%" PFMT64x, regs->address);
286  }
287  break;
289  rz_cons_printf("Fixed advance pc by %" PFMT64u, op->args.fixed_advance_pc);
290  rz_cons_printf(" to %" PFMT64d, regs->address);
291  break;
293  rz_cons_print("set_prologue_end");
294  break;
296  rz_cons_print("set_epilogue_begin");
297  break;
298  case DW_LNS_set_isa:
299  rz_cons_printf("set_isa to %" PFMT64u, op->args.set_isa);
300  break;
301  default:
302  rz_cons_printf("Unknown Standard Opcode %u", (unsigned int)op->opcode);
303  break;
304  }
305  break;
307  rz_cons_printf("Extended opcode %u: ", (unsigned int)op->opcode);
308  switch (op->opcode) {
309  case DW_LNE_end_sequence:
310  rz_cons_print("End of Sequence");
311  break;
312  case DW_LNE_set_address:
313  rz_cons_printf("set Address to 0x%" PFMT64x, op->args.set_address);
314  break;
315  case DW_LNE_define_file:
316  rz_cons_printf("define_file \"%s\", dir_index %" PFMT64u ", ",
317  op->args.define_file.filename,
318  op->args.define_file.dir_index);
319  break;
321  rz_cons_printf("set Discriminator to %" PFMT64u "\n", op->args.set_discriminator);
322  break;
323  default:
324  rz_cons_printf("Unknown");
325  break;
326  }
327  break;
329  rz_cons_printf("Special opcode %u: ", (unsigned int)rz_bin_dwarf_line_header_get_adj_opcode(hdr, op->opcode));
330  rz_cons_printf("advance Address by %" PFMT64u, rz_bin_dwarf_line_header_get_spec_op_advance_pc(hdr, op->opcode));
331  if (regs) {
332  rz_cons_printf(" to 0x%" PFMT64x, regs->address);
333  }
335  if (regs) {
336  rz_cons_printf(" to %" PFMT64u, regs->line);
337  }
338  break;
339  }
340  rz_cons_print("\n");
341 }
342 
343 RZ_API void rz_core_bin_dwarf_print_line_units(RzList /*<RzBinDwarfLineUnit *>*/ *lines) {
345  rz_cons_print("Raw dump of debug contents of section .debug_line:\n\n");
346  RzListIter *it;
347  RzBinDwarfLineUnit *unit;
348  bool first = true;
349  rz_list_foreach (lines, it, unit) {
350  if (first) {
351  first = false;
352  } else {
353  rz_cons_print("\n");
354  }
355  rz_cons_print(" Header information:\n");
356  rz_cons_printf(" Length: %" PFMT64u "\n", unit->header.unit_length);
357  rz_cons_printf(" DWARF Version: %d\n", unit->header.version);
358  rz_cons_printf(" Header Length: %" PFMT64d "\n", unit->header.header_length);
359  rz_cons_printf(" Minimum Instruction Length: %d\n", unit->header.min_inst_len);
360  rz_cons_printf(" Maximum Operations per Instruction: %d\n", unit->header.max_ops_per_inst);
361  rz_cons_printf(" Initial value of 'is_stmt': %d\n", unit->header.default_is_stmt);
362  rz_cons_printf(" Line Base: %d\n", unit->header.line_base);
363  rz_cons_printf(" Line Range: %d\n", unit->header.line_range);
364  rz_cons_printf(" Opcode Base: %d\n\n", unit->header.opcode_base);
365  rz_cons_print(" Opcodes:\n");
366  for (size_t i = 1; i < unit->header.opcode_base; i++) {
367  rz_cons_printf(" Opcode %zu has %d arg\n", i, unit->header.std_opcode_lengths[i - 1]);
368  }
369  rz_cons_print("\n");
370  if (unit->header.include_dirs_count && unit->header.include_dirs) {
371  rz_cons_printf(" The Directory Table:\n");
372  for (size_t i = 0; i < unit->header.include_dirs_count; i++) {
373  rz_cons_printf(" %u %s\n", (unsigned int)i + 1, unit->header.include_dirs[i]);
374  }
375  }
376  if (unit->header.file_names_count && unit->header.file_names) {
377  rz_cons_print("\n");
378  rz_cons_print(" The File Name Table:\n");
379  rz_cons_print(" Entry Dir Time Size Name\n");
380  for (size_t i = 0; i < unit->header.file_names_count; i++) {
382  rz_cons_printf(" %u %" PFMT32u " %" PFMT32u " %" PFMT32u " %s\n",
383  (unsigned int)i + 1, f->id_idx, f->mod_time, f->file_len, f->name);
384  }
385  rz_cons_print("\n");
386  }
387  if (unit->ops_count && unit->ops) {
388  // also execute all ops simultaneously which gives us nice intermediate value printing
391  rz_cons_print(" Line Number Statements:\n");
392  for (size_t i = 0; i < unit->ops_count; i++) {
393  rz_bin_dwarf_line_op_run(&unit->header, &regs, &unit->ops[i], NULL, NULL, NULL);
394  rz_cons_print(" ");
395  RzBinDwarfLineOp *op = &unit->ops[i];
396  print_line_op(op, &unit->header, &regs);
397  if (op->type == RZ_BIN_DWARF_LINE_OP_TYPE_EXT && op->opcode == DW_LNE_end_sequence && i + 1 < unit->ops_count) {
398  // extra newline for nice sequence separation
399  rz_cons_print("\n");
400  }
401  }
402  }
403  }
404  rz_cons_print("\n");
405 }
static char * regs[]
Definition: analysis_sh.c:203
lzma_index ** i
Definition: index.h:629
ut16 val
Definition: armass64_const.h:6
static RzBinSourceLineInfo * lines(RzBinFile *bf)
Definition: bin_symbols.c:427
RZ_API void rz_core_bin_dwarf_print_abbrev_section(const RzBinDwarfDebugAbbrev *da)
Definition: cdwarf.c:6
RZ_API void rz_core_bin_dwarf_print_debug_info(const RzBinDwarfDebugInfo *inf)
Definition: cdwarf.c:121
RZ_API void rz_core_bin_dwarf_print_attr_value(const RzBinDwarfAttrValue *val)
Definition: cdwarf.c:32
static void print_line_op(RzBinDwarfLineOp *op, RzBinDwarfLineHeader *hdr, RZ_NULLABLE RzBinDwarfSMRegisters *regs)
Definition: cdwarf.c:247
RZ_API void rz_core_bin_dwarf_print_line_units(RzList *lines)
Definition: cdwarf.c:343
static bool sort_loclists(void *user, const ut64 key, const void *value)
Definition: cdwarf.c:189
static int offset_comp(const void *a, const void *b)
Definition: cdwarf.c:175
RZ_API void rz_core_bin_dwarf_print_aranges(RzList *aranges)
Definition: cdwarf.c:222
RZ_API void rz_core_bin_dwarf_print_loc(HtUP *loc_table, int addr_size)
Definition: cdwarf.c:196
static int value
Definition: cmd_api.c:93
RZ_API int rz_cons_printf(const char *format,...)
Definition: cons.c:1202
#define RZ_API
#define NULL
Definition: cris-opc.c:27
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void static offset struct stat static buf void long static basep static whence static length const void static len key
Definition: sflib.h:118
const char * k
Definition: dsignal.c:11
RZ_API const char * rz_bin_dwarf_get_attr_name(ut64 attr_code)
Definition: dwarf.c:323
RZ_API const char * rz_bin_dwarf_get_lang_name(ut64 lang)
Definition: dwarf.c:387
RZ_API st64 rz_bin_dwarf_line_header_get_spec_op_advance_line(const RzBinDwarfLineHeader *header, ut8 opcode)
Definition: dwarf.c:628
RZ_API bool rz_bin_dwarf_line_op_run(const RzBinDwarfLineHeader *hdr, RzBinDwarfSMRegisters *regs, RzBinDwarfLineOp *op, RZ_NULLABLE RzBinSourceLineInfoBuilder *bob, RZ_NULLABLE RzBinDwarfDebugInfo *info, RZ_NULLABLE RzBinDwarfLineFileCache fnc)
Execute a single line op on regs and optionally store the resulting line info in bob.
Definition: dwarf.c:851
RZ_API const char * rz_bin_dwarf_get_attr_form_name(ut64 form_code)
Definition: dwarf.c:373
RZ_API ut64 rz_bin_dwarf_line_header_get_spec_op_advance_pc(const RzBinDwarfLineHeader *header, ut8 opcode)
Definition: dwarf.c:618
RZ_API void rz_bin_dwarf_line_header_reset_regs(const RzBinDwarfLineHeader *hdr, RzBinDwarfSMRegisters *regs)
Definition: dwarf.c:824
RZ_API const char * rz_bin_dwarf_get_tag_name(ut64 tag)
Definition: dwarf.c:316
RZ_API const char * rz_bin_dwarf_get_unit_type_name(ut64 unit_type)
Definition: dwarf.c:380
RZ_API ut64 rz_bin_dwarf_line_header_get_adj_opcode(const RzBinDwarfLineHeader *header, ut8 opcode)
Definition: dwarf.c:613
voidpf uLong offset
Definition: ioapi.h:144
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
Definition: list.c:235
RZ_API RZ_BORROW RzListIter * rz_list_add_sorted(RZ_NONNULL RzList *list, void *data, RZ_NONNULL RzListComparator cmp)
Adds an element to a sorted list via the RzListComparator.
Definition: list.c:518
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
Definition: list.c:137
static RzSocket * s
Definition: rtr.c:28
#define rz_return_if_fail(expr)
Definition: rz_assert.h:100
#define DW_FORM_strx4
Definition: rz_bin_dwarf.h:317
#define DW_FORM_strx3
Definition: rz_bin_dwarf.h:316
#define DW_FORM_exprloc
Definition: rz_bin_dwarf.h:301
#define DW_FORM_sdata
Definition: rz_bin_dwarf.h:290
#define DW_FORM_addrx4
Definition: rz_bin_dwarf.h:321
#define DW_FORM_udata
Definition: rz_bin_dwarf.h:292
#define DW_LNE_set_address
Definition: rz_bin_dwarf.h:33
#define DW_FORM_ref_sup8
Definition: rz_bin_dwarf.h:313
#define DW_LNS_set_column
Definition: rz_bin_dwarf.h:23
#define DW_LNS_advance_pc
Definition: rz_bin_dwarf.h:20
#define DW_FORM_strx
Definition: rz_bin_dwarf.h:303
#define DW_FORM_addrx3
Definition: rz_bin_dwarf.h:320
#define DW_AT_language
Definition: rz_bin_dwarf.h:143
#define DW_FORM_ref_udata
Definition: rz_bin_dwarf.h:298
#define DW_LNS_advance_line
Definition: rz_bin_dwarf.h:21
#define DW_LNS_set_file
Definition: rz_bin_dwarf.h:22
#define DW_FORM_block2
Definition: rz_bin_dwarf.h:280
#define DW_FORM_addr
Definition: rz_bin_dwarf.h:279
#define DW_FORM_data16
Definition: rz_bin_dwarf.h:307
#define DW_LNS_copy
Definition: rz_bin_dwarf.h:19
#define DW_FORM_line_ptr
Definition: rz_bin_dwarf.h:308
#define DW_LNS_set_isa
Definition: rz_bin_dwarf.h:30
#define DW_FORM_ref_sup4
Definition: rz_bin_dwarf.h:305
#define DW_LNS_negate_stmt
Definition: rz_bin_dwarf.h:24
#define DW_FORM_ref_sig8
Definition: rz_bin_dwarf.h:309
#define DW_FORM_implicit_const
Definition: rz_bin_dwarf.h:310
#define DW_FORM_block1
Definition: rz_bin_dwarf.h:287
#define DW_LNE_set_discriminator
Definition: rz_bin_dwarf.h:35
#define DW_FORM_block
Definition: rz_bin_dwarf.h:286
#define DW_FORM_strx1
Definition: rz_bin_dwarf.h:314
#define DW_FORM_ref_addr
Definition: rz_bin_dwarf.h:293
#define DW_FORM_strx2
Definition: rz_bin_dwarf.h:315
#define DW_FORM_string
Definition: rz_bin_dwarf.h:285
#define DW_LNS_set_epilogue_begin
Definition: rz_bin_dwarf.h:29
@ RZ_BIN_DWARF_LINE_OP_TYPE_SPEC
Definition: rz_bin_dwarf.h:859
@ RZ_BIN_DWARF_LINE_OP_TYPE_EXT
Definition: rz_bin_dwarf.h:861
@ RZ_BIN_DWARF_LINE_OP_TYPE_STD
Definition: rz_bin_dwarf.h:860
#define DW_FORM_block4
Definition: rz_bin_dwarf.h:281
#define DW_FORM_addrx2
Definition: rz_bin_dwarf.h:319
#define DW_LNS_fixed_advance_pc
Definition: rz_bin_dwarf.h:27
#define DW_FORM_addrx1
Definition: rz_bin_dwarf.h:318
#define DW_FORM_data2
Definition: rz_bin_dwarf.h:282
#define DW_FORM_flag_present
Definition: rz_bin_dwarf.h:302
#define DW_LNE_define_file
Definition: rz_bin_dwarf.h:34
#define DW_FORM_flag
Definition: rz_bin_dwarf.h:289
#define DW_LNS_set_basic_block
Definition: rz_bin_dwarf.h:25
#define DW_FORM_data4
Definition: rz_bin_dwarf.h:283
#define DW_FORM_data1
Definition: rz_bin_dwarf.h:288
#define DW_FORM_strp_sup
Definition: rz_bin_dwarf.h:306
#define DW_FORM_data8
Definition: rz_bin_dwarf.h:284
#define DW_FORM_ref2
Definition: rz_bin_dwarf.h:295
#define DW_FORM_ref8
Definition: rz_bin_dwarf.h:297
#define DW_FORM_addrx
Definition: rz_bin_dwarf.h:304
#define DW_FORM_rnglistx
Definition: rz_bin_dwarf.h:312
#define DW_FORM_strp
Definition: rz_bin_dwarf.h:291
#define DW_FORM_ref1
Definition: rz_bin_dwarf.h:294
#define DW_FORM_loclistx
Definition: rz_bin_dwarf.h:311
#define DW_LNS_set_prologue_end
Definition: rz_bin_dwarf.h:28
#define DW_FORM_ref4
Definition: rz_bin_dwarf.h:296
#define DW_LNE_end_sequence
Definition: rz_bin_dwarf.h:32
#define DW_FORM_sec_offset
Definition: rz_bin_dwarf.h:300
#define DW_LNS_const_add_pc
Definition: rz_bin_dwarf.h:26
RZ_API const char * rz_str_bool(int b)
Definition: str.c:3896
#define PFMT64d
Definition: rz_types.h:394
#define RZ_NULLABLE
Definition: rz_types.h:65
#define PFMT32u
Definition: rz_types.h:409
#define PFMT64u
Definition: rz_types.h:395
#define PFMT64x
Definition: rz_types.h:393
#define b(i)
Definition: sha256.c:42
#define f(i)
Definition: sha256.c:46
#define a(i)
Definition: sha256.c:41
RzBinDwarfAttrDef * defs
Definition: rz_bin_dwarf.h:793
RzBinDwarfAbbrevDecl * decls
Definition: rz_bin_dwarf.h:801
RzBinDwarfAttrValue * attr_values
Definition: rz_bin_dwarf.h:756
ut8 * std_opcode_lengths
The number of LEB128 operands for each of the standard opcodes From standard_opcode_lengths in DWARF ...
Definition: rz_bin_dwarf.h:850
RzBinDwarfLineFileEntry * file_names
Definition: rz_bin_dwarf.h:854
DWARF 3 Standard Section 6.2 Line Number Information This contains the entire raw line info for one c...
Definition: rz_bin_dwarf.h:891
RzBinDwarfLineHeader header
Definition: rz_bin_dwarf.h:892
RzBinDwarfLineOp * ops
Definition: rz_bin_dwarf.h:895
DWARF 3 Standard Section 6.1.2 Lookup by Address.
Definition: rz_bin_dwarf.h:931
RzBinDwarfARange * aranges
Definition: rz_bin_dwarf.h:939
Definition: rz_bin_dwarf.h:822
Definition: rz_bin_dwarf.h:912
Definition: dis.c:32
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
int inf(FILE *source, FILE *dest)
Definition: zpipe.c:92