Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dwarf5 load #4752

Merged
merged 5 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions librz/arch/dwarf_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@ static RzBinDwarfLocation *location_parse(
return NULL;
}
ut64 offset = rz_bin_dwarf_attr_udata(attr);
RzBinDwarfLocList *loclist = rz_bin_dwarf_loclists_get(ctx->dw->loclists, ctx->dw->addr, ctx->unit, offset);
RzBinDwarfLocList *loclist = rz_bin_dwarf_loclists_get(ctx->dw->loclists, rz_bin_dwarf_addr(ctx->dw), ctx->unit, offset);
if (!loclist) { /* for some reason offset isn't there, wrong parsing or malformed dwarf */
goto err_find;
}
Expand Down Expand Up @@ -1672,7 +1672,8 @@ static bool try_create_var_global(

RzBinDwarfAttr *attr = NULL;
attr = rz_bin_dwarf_die_get_attr(die, DW_AT_decl_file);
RzBinDwarfLineUnit *lu = ctx->unit ? rz_pvector_at(ctx->dw->line->units, ctx->unit->index) : NULL;
RzBinDwarfLine *dw_line = rz_bin_dwarf_line(ctx->dw);
RzBinDwarfLineUnit *lu = ctx->unit && dw_line ? rz_pvector_at(dw_line->units, ctx->unit->index) : NULL;
ut64 file_index = attr ? rz_bin_dwarf_attr_udata(attr) : UT64_MAX;
const char *file = file_index != 0 && lu ? rz_bin_dwarf_file_path(ctx->dw, lu, file_index) : NULL;

Expand Down
4 changes: 2 additions & 2 deletions librz/bin/dwarf/abbrev.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ RZ_API RZ_OWN RzBinDwarfAbbrev *rz_bin_dwarf_abbrev_new(RZ_OWN RZ_NONNULL RzBinE
* \return RzBinDwarfAbbrevs object
*/
RZ_API RZ_OWN RzBinDwarfAbbrev *rz_bin_dwarf_abbrev_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf, bool is_dwo) {
RZ_BORROW RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinEndianReader *r = RzBinEndianReader_from_file(bf, ".debug_abbrev", is_dwo);
RzBinEndianReader *r = RzBinEndianReader_from_file(bf, ".debug_abbrev");
RET_NULL_IF_FAIL(r);
return rz_bin_dwarf_abbrev_new(r);
}
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/dwarf/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RZ_API RZ_OWN RzBinDwarfAddr *rz_bin_dwarf_addr_new(RZ_OWN RZ_NONNULL RzBinEndia

RZ_API RZ_OWN RzBinDwarfAddr *rz_bin_dwarf_addr_from_file(RZ_BORROW RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinEndianReader *r = RzBinEndianReader_from_file(bf, ".debug_addr", false);
RzBinEndianReader *r = RzBinEndianReader_from_file(bf, ".debug_addr");
RET_NULL_IF_FAIL(r);
return rz_bin_dwarf_addr_new(r);
}
2 changes: 1 addition & 1 deletion librz/bin/dwarf/aranges.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ RZ_API RZ_OWN RzBinDwarfARanges *rz_bin_dwarf_aranges_new(RZ_NONNULL RZ_OWN RzBi
*/
RZ_API RZ_OWN RzBinDwarfARanges *rz_bin_dwarf_aranges_from_file(RZ_BORROW RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_aranges", false);
RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_aranges");
RET_NULL_IF_FAIL(R);
return rz_bin_dwarf_aranges_new(R);
}
Expand Down
8 changes: 4 additions & 4 deletions librz/bin/dwarf/attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ RZ_IPI bool RzBinDwarfAttr_parse(
/// offset into .debug_str_offsets section
case DW_FORM_strx:
value->kind = RzBinDwarfAttr_StrOffsetIndex;
RET_FALSE_IF_FAIL(R_read_offset(R, &value->u64, is_64bit));
ULE128_OR_RET_FALSE(value->u64);
break;
case DW_FORM_strx1:
value->kind = RzBinDwarfAttr_StrOffsetIndex;
Expand Down Expand Up @@ -232,7 +232,7 @@ RZ_API const char *rz_bin_dwarf_attr_string(
} else if (v->kind == RzBinDwarfAttr_StrOffsetIndex && dw) {
orig = rz_bin_dwarf_str_offsets_get(dw->str, dw->str_offsets, str_offsets_base, v->u64);
} else if (v->kind == RzBinDwarfAttr_LineStrRef && dw) {
orig = rz_bin_dwarf_line_str_get(dw->line_str, v->u64);
orig = rz_bin_dwarf_line_str_get(rz_bin_dwarf_line_str(dw), v->u64);
}
return orig;
}
Expand Down Expand Up @@ -265,11 +265,11 @@ RZ_API void rz_bin_dwarf_attr_dump(

switch (attr->at) {
case DW_AT_language:
rz_strbuf_append(sb, rz_bin_dwarf_lang(attr->value.u64));
rz_strbuf_append(sb, rz_str_get_null(rz_bin_dwarf_lang(attr->value.u64)));
rz_strbuf_append(sb, ", raw: ");
break;
case DW_AT_encoding:
rz_strbuf_append(sb, rz_bin_dwarf_ate(attr->value.u64));
rz_strbuf_append(sb, rz_str_get_null(rz_bin_dwarf_ate(attr->value.u64)));
rz_strbuf_append(sb, ", raw: ");
break;
default: break;
Expand Down
41 changes: 21 additions & 20 deletions librz/bin/dwarf/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ RZ_IPI bool RzBinDwarfEncoding_from_file(RzBinDwarfEncoding *encoding, RzBinFile
}

static inline RZ_OWN RzBinDWARF *dwarf_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf, bool is_dwo) {
RZ_BORROW RZ_NONNULL RzBinFile *bf, RZ_BORROW RZ_NULLABLE RzBinDWARF *parent) {
rz_return_val_if_fail(bf, NULL);
RzBinDWARF *dw = RZ_NEW0(RzBinDWARF);
RET_NULL_IF_FAIL(dw);

dw->parent = parent;
dw->addr = rz_bin_dwarf_addr_from_file(bf);
dw->line_str = rz_bin_dwarf_line_str_from_file(bf);
dw->aranges = rz_bin_dwarf_aranges_from_file(bf);

dw->str = rz_bin_dwarf_str_from_file(bf, is_dwo);
dw->str_offsets = rz_bin_dwarf_str_offsets_from_file(bf, is_dwo);
dw->loclists = rz_bin_dwarf_loclists_new_from_file(bf, is_dwo);
dw->rnglists = rz_bin_dwarf_rnglists_new_from_file(bf, is_dwo);
dw->abbrev = rz_bin_dwarf_abbrev_from_file(bf, is_dwo);
dw->str = rz_bin_dwarf_str_from_file(bf);
dw->str_offsets = rz_bin_dwarf_str_offsets_from_file(bf);
dw->loclists = rz_bin_dwarf_loclists_new_from_file(bf);
dw->rnglists = rz_bin_dwarf_rnglists_new_from_file(bf);
dw->abbrev = rz_bin_dwarf_abbrev_from_file(bf);

if (dw->abbrev) {
dw->info = rz_bin_dwarf_info_from_file(bf, dw, is_dwo);
dw->info = rz_bin_dwarf_info_from_file(dw, bf);
}
if (dw->info) {
dw->line = rz_bin_dwarf_line_from_file(bf, dw, is_dwo);
dw->line = rz_bin_dwarf_line_from_file(dw, bf);
}
if (!(dw->addr || dw->line_str || dw->aranges || dw->str || dw->str_offsets || dw->loclists || dw->rnglists || dw->abbrev)) {
rz_bin_dwarf_free(dw);
Expand All @@ -54,7 +55,7 @@ static inline char *read_debuglink(RzBinFile *binfile) {
const char *name = NULL;
RzBinEndianReader *R = NULL;
RET_NULL_IF_FAIL(
(sect = rz_bin_dwarf_section_by_name(binfile, ".gnu_debuglink", false)) &&
(sect = rz_bin_dwarf_section_by_name(binfile, ".gnu_debuglink")) &&
(R = rz_bin_dwarf_section_reader(binfile, sect)) &&
R_read_cstring(R, &name));
// TODO: Verification the CRC
Expand All @@ -64,7 +65,7 @@ static inline char *read_debuglink(RzBinFile *binfile) {
}

static inline char *read_build_id(RzBinFile *binfile) {
RzBinSection *sect = rz_bin_dwarf_section_by_name(binfile, ".note.gnu.build-id", false);
RzBinSection *sect = rz_bin_dwarf_section_by_name(binfile, ".note.gnu.build-id");
RET_NULL_IF_FAIL(sect);
RzBinEndianReader *R = rz_bin_dwarf_section_reader(binfile, sect);
RET_NULL_IF_FAIL(R);
Expand Down Expand Up @@ -129,7 +130,7 @@ static inline RzBinDWARF *dwarf_from_debuglink(
free(file_dir);
return NULL;
ok:
dw = rz_bin_dwarf_from_path(path, false);
dw = rz_bin_dwarf_from_path(path, NULL);
free(dir);
free(path);
free(file_dir);
Expand All @@ -145,7 +146,7 @@ static inline RzBinDWARF *dwarf_from_build_id(
char *dir = rz_file_path_join(debug_file_directory, ".build-id");
char *path = rz_file_path_join(dir, build_id_path);
if (rz_file_exists(path)) {
RzBinDWARF *dw = rz_bin_dwarf_from_path(path, false);
RzBinDWARF *dw = rz_bin_dwarf_from_path(path, NULL);
free(dir);
free(path);
return dw;
Expand Down Expand Up @@ -288,7 +289,7 @@ RZ_API RZ_OWN RzBinDWARF *rz_bin_dwarf_from_debuginfod(
if (!url) {
break;
}
dw = rz_bin_dwarf_from_path(url, false);
dw = rz_bin_dwarf_from_path(url, NULL);
free(url);
if (dw) {
break;
Expand All @@ -304,24 +305,24 @@ RZ_API RZ_OWN RzBinDWARF *rz_bin_dwarf_from_debuginfod(
* \return RzBinDWARF pointer or NULL if failed
*/
RZ_API RZ_OWN RzBinDWARF *rz_bin_dwarf_from_path(
RZ_BORROW RZ_NONNULL const char *filepath, bool is_dwo) {
RZ_BORROW RZ_NONNULL const char *filepath, RZ_BORROW RZ_NULLABLE RzBinDWARF *parent) {
rz_return_val_if_fail(filepath, NULL);

RzBinDWARF *dwo = NULL;
RzBinDWARF *dw = NULL;
DwBinary binary = { 0 };
if (!binary_from_path(&binary, filepath)) {
goto beach;
}
dwo = dwarf_from_file(binary.bf, is_dwo);
dw = dwarf_from_file(binary.bf, parent);

beach:
binary_close(&binary);
return dwo;
return dw;
}

RZ_API RZ_OWN RzBinDWARF *rz_bin_dwarf_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf) {
return dwarf_from_file(bf, false);
return dwarf_from_file(bf, NULL);
}

RZ_API void rz_bin_dwarf_free(RZ_OWN RZ_NULLABLE RzBinDWARF *dw) {
Expand Down Expand Up @@ -363,7 +364,7 @@ RZ_API void rz_bin_dwarf_dump(
if (dw->rnglists) {
rz_bin_dwarf_rnglists_dump(dw->rnglists, sb);
}
if (dw->line) {
rz_bin_dwarf_line_units_dump(dw->line, sb);
if (rz_bin_dwarf_line(dw)) {
rz_bin_dwarf_line_units_dump(rz_bin_dwarf_line(dw), sb);
}
}
4 changes: 2 additions & 2 deletions librz/bin/dwarf/dwarf_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ typedef RzBinDwarfLocation Location;

RZ_IPI bool ListsHdr_parse(RzBinDwarfListsHdr *hdr, RzBinEndianReader *R);

RZ_IPI RzBinSection *rz_bin_dwarf_section_by_name(RzBinFile *binfile, const char *sn, bool is_dwo);
RZ_IPI RzBinSection *rz_bin_dwarf_section_by_name(RzBinFile *binfile, const char *sn);

RZ_IPI bool RzBinDwarfAttr_parse(RzBinEndianReader *R, RzBinDwarfAttr *attr, AttrOption *opt);

RZ_IPI RzBinEndianReader *RzBinEndianReader_from_file(
RzBinFile *binfile, const char *sect_name, bool is_dwo);
RzBinFile *binfile, const char *sect_name);

static inline bool bf_bigendian(RzBinFile *bf) {
return bf->o && bf->o->info && bf->o->info->big_endian;
Expand Down
57 changes: 45 additions & 12 deletions librz/bin/dwarf/endian_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,28 @@
#include "dwarf_private.h"
#include "../format/elf/elf.h"

RZ_IPI RzBinSection *rz_bin_dwarf_section_by_name(RzBinFile *binfile, const char *sn, bool is_dwo) {
typedef struct {
const char *name;
const char *alias[8];
} SectionAlias;

static const SectionAlias section_alias[] = {
{ .name = ".debug_str_offsets", .alias = { ".__DWARF.__debug_str_offs", ".debug_str_offsets.dwo", NULL } },
{ .name = ".debug_str", .alias = { ".debug_str.dwo", NULL } },
{ .name = ".debug_addr", .alias = { ".debug_addr.dwo", NULL } },
{ .name = ".debug_line_str", .alias = { ".debug_line_str.dwo", NULL } },
{ .name = ".debug_aranges", .alias = { ".debug_aranges.dwo", NULL } },
{ .name = ".debug_loclists", .alias = { ".debug_loclists.dwo", NULL } },
{ .name = ".debug_loc", .alias = { ".debug_loc.dwo", NULL } },
{ .name = ".debug_rnglists", .alias = { ".debug_rnglists.dwo", NULL } },
{ .name = ".debug_ranges", .alias = { ".debug_ranges.dwo", NULL } },
{ .name = ".debug_abbrev", .alias = { ".debug_abbrev.dwo", NULL } },
{ .name = ".debug_info", .alias = { ".debug_info.dwo", NULL } },
{ .name = ".debug_line", .alias = { ".debug_line.dwo", NULL } },

};

RZ_IPI RzBinSection *rz_bin_dwarf_section_by_name(RzBinFile *binfile, const char *sn) {
rz_return_val_if_fail(binfile && sn, NULL);
void **iter = NULL;
RzBinSection *section = NULL;
Expand All @@ -15,22 +36,34 @@ RZ_IPI RzBinSection *rz_bin_dwarf_section_by_name(RzBinFile *binfile, const char
if (!o || !o->sections || RZ_STR_ISEMPTY(sn)) {
return NULL;
}
char *name = is_dwo ? rz_str_newf("%s.dwo", sn) : rz_str_dup(sn);
if (!name) {
return NULL;
}
rz_pvector_foreach (o->sections, iter) {
section = *iter;
if (!section->name) {
continue;
}
if (RZ_STR_EQ(section->name, name) ||
rz_str_endswith(section->name, name + 1)) {
result_section = section;
break;
if (!rz_str_endswith(section->name, sn + 1)) {
continue;
}
result_section = section;
goto beach;
}
free(name);
for (int i = 0; i < RZ_ARRAY_SIZE(section_alias); ++i) {
const SectionAlias *alias = section_alias + i;
if (RZ_STR_NE(sn, alias->name)) {
continue;
}
rz_pvector_foreach (o->sections, iter) {
section = *iter;
for (const char **x = (const char **)alias->alias; RZ_STR_ISNOTEMPTY(*x); ++x) {
if (rz_str_endswith(section->name, *x)) {
result_section = section;
goto beach;
}
}
}
}

beach:
return result_section;
}

Expand Down Expand Up @@ -140,9 +173,9 @@ static inline void add_relocations(
}
}

RZ_IPI RzBinEndianReader *RzBinEndianReader_from_file(RzBinFile *binfile, const char *sect_name, bool is_dwo) {
RZ_IPI RzBinEndianReader *RzBinEndianReader_from_file(RzBinFile *binfile, const char *sect_name) {
rz_return_val_if_fail(binfile && sect_name, NULL);
RzBinSection *section = rz_bin_dwarf_section_by_name(binfile, sect_name, is_dwo);
RzBinSection *section = rz_bin_dwarf_section_by_name(binfile, sect_name);
OK_OR(section, return NULL);
RzBinEndianReader *R = rz_bin_dwarf_section_reader(binfile, section);
OK_OR(R, return NULL);
Expand Down
5 changes: 2 additions & 3 deletions librz/bin/dwarf/line.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,16 +726,15 @@ RZ_API RZ_OWN RzBinDwarfLine *rz_bin_dwarf_line_new(
* \return RzBinDwarfLineInfo or NULL if failed
*/
RZ_API RZ_OWN RzBinDwarfLine *rz_bin_dwarf_line_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf,
RZ_BORROW RZ_NULLABLE RzBinDWARF *dw,
bool is_dwo) {
RZ_BORROW RZ_NONNULL RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinDwarfEncoding encoding = { 0 };
if (!RzBinDwarfEncoding_from_file(&encoding, bf)) {
return NULL;
}

RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_line", is_dwo);
RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_line");
RET_NULL_IF_FAIL(R);
return Line_parse(R, &encoding, dw);
}
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/dwarf/line_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RZ_API RZ_OWN RzBinDwarfLineStr *rz_bin_dwarf_line_str_new(RZ_NONNULL RZ_OWN RzB
}

RZ_API RZ_OWN RzBinDwarfLineStr *rz_bin_dwarf_line_str_from_file(RZ_NONNULL RZ_BORROW RzBinFile *bf) {
RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_line_str", false);
RzBinEndianReader *R = RzBinEndianReader_from_file(bf, ".debug_line_str");
RET_NULL_IF_FAIL(R);
return rz_bin_dwarf_str_new(R);
}
Expand Down
7 changes: 3 additions & 4 deletions librz/bin/dwarf/loclists.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,10 @@ RZ_API RZ_OWN RzBinDwarfLocLists *rz_bin_dwarf_loclists_new(RzBinEndianReader *l
* \param dw RzBinDwarf instance
* \return RzBinDwarfLocListTable instance on success, NULL otherwise
*/
RZ_API RZ_OWN RzBinDwarfLocLists *rz_bin_dwarf_loclists_new_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf, bool is_dwo) {
RZ_API RZ_OWN RzBinDwarfLocLists *rz_bin_dwarf_loclists_new_from_file(RZ_BORROW RZ_NONNULL RzBinFile *bf) {
RET_NULL_IF_FAIL(bf);
RzBinEndianReader *loclists = RzBinEndianReader_from_file(bf, ".debug_loclists", is_dwo);
RzBinEndianReader *loc = RzBinEndianReader_from_file(bf, ".debug_loc", is_dwo);
RzBinEndianReader *loclists = RzBinEndianReader_from_file(bf, ".debug_loclists");
RzBinEndianReader *loc = RzBinEndianReader_from_file(bf, ".debug_loc");
if (!(loclists || loc)) {
R_free(loclists);
R_free(loc);
Expand Down
2 changes: 1 addition & 1 deletion librz/bin/dwarf/op.c
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ static bool Evaluation_evaluate_one_operation(
}
case OPERATION_KIND_ADDRESS_INDEX: {
ut64 addr = 0;
if (self->dw && self->unit && rz_bin_dwarf_addr_get(self->dw->addr, &addr, self->unit->hdr.encoding.address_size, self->unit->addr_base, operation.address_index.index)) {
if (self->dw && self->unit && rz_bin_dwarf_addr(self->dw) && rz_bin_dwarf_addr_get(rz_bin_dwarf_addr(self->dw), &addr, self->unit->hdr.encoding.address_size, self->unit->addr_base, operation.address_index.index)) {
out->kind = OperationEvaluationResult_COMPLETE;
out->complete.kind = RzBinDwarfLocationKind_ADDRESS;
out->complete.address = addr;
Expand Down
7 changes: 3 additions & 4 deletions librz/bin/dwarf/rnglists.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,10 @@ RZ_API RZ_OWN RzBinDwarfRngLists *rz_bin_dwarf_rnglists_new(
* \param dw the RzBinDWARF instance
* \return the RzBinDwarfRngListTable instance on success, NULL otherwise
*/
RZ_API RZ_OWN RzBinDwarfRngLists *rz_bin_dwarf_rnglists_new_from_file(
RZ_BORROW RZ_NONNULL RzBinFile *bf, bool is_dwo) {
RZ_API RZ_OWN RzBinDwarfRngLists *rz_bin_dwarf_rnglists_new_from_file(RZ_BORROW RZ_NONNULL RzBinFile *bf) {
RET_NULL_IF_FAIL(bf);
RzBinEndianReader *rnglists = RzBinEndianReader_from_file(bf, ".debug_rnglists", is_dwo);
RzBinEndianReader *ranges = RzBinEndianReader_from_file(bf, ".debug_ranges", is_dwo);
RzBinEndianReader *rnglists = RzBinEndianReader_from_file(bf, ".debug_rnglists");
RzBinEndianReader *ranges = RzBinEndianReader_from_file(bf, ".debug_ranges");
if (!(rnglists || ranges)) {
R_free(rnglists);
R_free(ranges);
Expand Down
4 changes: 2 additions & 2 deletions librz/bin/dwarf/str.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ RZ_API RZ_OWN RzBinDwarfStr *rz_bin_dwarf_str_new(RZ_NONNULL RZ_OWN RzBinEndianR
return str;
}

RZ_API RZ_OWN RzBinDwarfStr *rz_bin_dwarf_str_from_file(RZ_NONNULL RZ_BORROW RzBinFile *bf, bool is_dwo) {
RZ_API RZ_OWN RzBinDwarfStr *rz_bin_dwarf_str_from_file(RZ_NONNULL RZ_BORROW RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinEndianReader *r = RzBinEndianReader_from_file(
bf, ".debug_str", is_dwo);
bf, ".debug_str");
RET_NULL_IF_FAIL(r);
return rz_bin_dwarf_str_new(r);
}
Expand Down
4 changes: 2 additions & 2 deletions librz/bin/dwarf/str_offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ RZ_API RZ_OWN RzBinDwarfStrOffsets *rz_bin_dwarf_str_offsets_from_buf(
}

RZ_API RZ_OWN RzBinDwarfStrOffsets *rz_bin_dwarf_str_offsets_from_file(
RZ_NONNULL RZ_BORROW RzBinFile *bf, bool is_dwo) {
RZ_NONNULL RZ_BORROW RzBinFile *bf) {
rz_return_val_if_fail(bf, NULL);
RzBinEndianReader *r = RzBinEndianReader_from_file(
bf, ".debug_str_offsets", is_dwo);
bf, ".debug_str_offsets");
RET_NULL_IF_FAIL(r);
return rz_bin_dwarf_str_offsets_from_buf(r);
}
Expand Down
Loading
Loading