24 if (attr_name && attr_form_name) {
36 switch (
val->attr_form) {
43 for (
i = 0;
i <
val->block.length;
i++) {
61 if (
val->string.content) {
64 rz_cons_print(
"No string found");
100 val->string.offset,
val->string.content);
128 for (
i = 0;
i <
inf->count;
i++) {
136 if (unit_type_name) {
141 dies =
inf->comp_units[
i].dies;
143 for (j = 0; j <
inf->comp_units[
i].count; j++) {
150 rz_cons_print(
"(Unknown abbrev tag)\n");
153 if (!dies[j].abbrev_code) {
158 for (
k = 0;
k < dies[j].
count;
k++) {
159 if (!values[
k].attr_name) {
178 ut64 first =
f->offset;
179 ut64 second =
s->offset;
180 if (first < second) {
183 if (first > second) {
198 rz_cons_print(
"\nContents of the .debug_loc section:\n");
205 rz_list_foreach (sort_list,
i, loc_list) {
209 rz_list_foreach (loc_list->
list, j,
range) {
211 base_offset += addr_size * 2;
212 if (
range->expression) {
213 base_offset += 2 +
range->expression->length;
224 rz_cons_print(
"\nContents of the .debug_aranges section:\n");
227 rz_list_foreach (aranges, it, set) {
228 rz_cons_print(
" Address Range Set\n");
235 rz_cons_print(
" Ranges:\n");
236 rz_cons_print(
" address length\n");
250 switch (
op->opcode) {
252 rz_cons_print(
"Copy");
276 rz_cons_print(
"Negate is_stmt");
280 rz_cons_print(
"set_basic_block");
293 rz_cons_print(
"set_prologue_end");
296 rz_cons_print(
"set_epilogue_begin");
308 switch (
op->opcode) {
310 rz_cons_print(
"End of Sequence");
317 op->args.define_file.filename,
318 op->args.define_file.dir_index);
345 rz_cons_print(
"Raw dump of debug contents of section .debug_line:\n\n");
349 rz_list_foreach (
lines, it, unit) {
355 rz_cons_print(
" Header information:\n");
365 rz_cons_print(
" Opcodes:\n");
378 rz_cons_print(
" The File Name Table:\n");
379 rz_cons_print(
" Entry Dir Time Size Name\n");
383 (
unsigned int)
i + 1,
f->id_idx,
f->mod_time,
f->file_len,
f->name);
391 rz_cons_print(
" Line Number Statements:\n");
static RzBinSourceLineInfo * lines(RzBinFile *bf)
RZ_API void rz_core_bin_dwarf_print_abbrev_section(const RzBinDwarfDebugAbbrev *da)
RZ_API void rz_core_bin_dwarf_print_debug_info(const RzBinDwarfDebugInfo *inf)
RZ_API void rz_core_bin_dwarf_print_attr_value(const RzBinDwarfAttrValue *val)
static void print_line_op(RzBinDwarfLineOp *op, RzBinDwarfLineHeader *hdr, RZ_NULLABLE RzBinDwarfSMRegisters *regs)
RZ_API void rz_core_bin_dwarf_print_line_units(RzList *lines)
static bool sort_loclists(void *user, const ut64 key, const void *value)
static int offset_comp(const void *a, const void *b)
RZ_API void rz_core_bin_dwarf_print_aranges(RzList *aranges)
RZ_API void rz_core_bin_dwarf_print_loc(HtUP *loc_table, int addr_size)
RZ_API int rz_cons_printf(const char *format,...)
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
RZ_API const char * rz_bin_dwarf_get_attr_name(ut64 attr_code)
RZ_API const char * rz_bin_dwarf_get_lang_name(ut64 lang)
RZ_API st64 rz_bin_dwarf_line_header_get_spec_op_advance_line(const RzBinDwarfLineHeader *header, ut8 opcode)
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.
RZ_API const char * rz_bin_dwarf_get_attr_form_name(ut64 form_code)
RZ_API ut64 rz_bin_dwarf_line_header_get_spec_op_advance_pc(const RzBinDwarfLineHeader *header, ut8 opcode)
RZ_API void rz_bin_dwarf_line_header_reset_regs(const RzBinDwarfLineHeader *hdr, RzBinDwarfSMRegisters *regs)
RZ_API const char * rz_bin_dwarf_get_tag_name(ut64 tag)
RZ_API const char * rz_bin_dwarf_get_unit_type_name(ut64 unit_type)
RZ_API ut64 rz_bin_dwarf_line_header_get_adj_opcode(const RzBinDwarfLineHeader *header, ut8 opcode)
RZ_API RZ_OWN RzList * rz_list_new(void)
Returns a new initialized RzList pointer (free method is not initialized)
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.
RZ_API void rz_list_free(RZ_NONNULL RzList *list)
Empties the list and frees the list pointer.
#define rz_return_if_fail(expr)
#define DW_LNE_set_address
#define DW_LNS_set_column
#define DW_LNS_advance_pc
#define DW_FORM_ref_udata
#define DW_LNS_advance_line
#define DW_LNS_negate_stmt
#define DW_FORM_implicit_const
#define DW_LNE_set_discriminator
#define DW_LNS_set_epilogue_begin
@ RZ_BIN_DWARF_LINE_OP_TYPE_SPEC
@ RZ_BIN_DWARF_LINE_OP_TYPE_EXT
@ RZ_BIN_DWARF_LINE_OP_TYPE_STD
#define DW_LNS_fixed_advance_pc
#define DW_FORM_flag_present
#define DW_LNE_define_file
#define DW_LNS_set_basic_block
#define DW_LNS_set_prologue_end
#define DW_LNE_end_sequence
#define DW_FORM_sec_offset
#define DW_LNS_const_add_pc
RZ_API const char * rz_str_bool(int b)
RzBinDwarfAbbrevDecl * decls
RzBinDwarfAttrValue * attr_values
DWARF 3 Standard Section 6.2 Line Number Information This contains the entire raw line info for one c...
RzBinDwarfLineHeader header
DWARF 3 Standard Section 6.1.2 Lookup by Address.
RzBinDwarfARange * aranges
ut64(WINAPI *w32_GetEnabledXStateFeatures)()
int inf(FILE *source, FILE *dest)