diff --git a/rizin b/rizin index ccbfe57b..f5ca4b96 160000 --- a/rizin +++ b/rizin @@ -1 +1 @@ -Subproject commit ccbfe57b683f247f9b73835a1c46f50627ba4edd +Subproject commit f5ca4b96310efb7e38100076580d854b5aaf3248 diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index be3f8f7a..c87404f0 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -3153,7 +3153,8 @@ QList CutterCore::getAllExports() if (!bf) { return {}; } - const RzList *symbols = rz_bin_object_get_symbols(bf->o); + + const RzPVector *symbols = rz_bin_object_get_symbols(bf->o); if (!symbols) { return {}; } @@ -3162,7 +3163,7 @@ QList CutterCore::getAllExports() bool demangle = rz_config_get_b(core->config, "bin.demangle"); QList ret; - for (const auto &symbol : CutterRzList(symbols)) { + for (const auto &symbol : CutterPVector(symbols)) { if (!(symbol->name && rz_core_sym_is_export(symbol))) { continue; } @@ -3187,13 +3188,15 @@ QList CutterCore::getAllExports() QList CutterCore::getAllSymbols() { CORE_LOCK(); - RzListIter *it; - QList ret; - RzBinSymbol *bs; - if (core && core->bin && core->bin->cur && core->bin->cur->o) { - CutterRzListForeach (core->bin->cur->o->symbols, it, RzBinSymbol, bs) { + if (!(core && core->bin && core->bin->cur && core->bin->cur->o)) { + return {}; + } + + const RzPVector *symbols = rz_bin_object_get_symbols(core->bin->cur->o); + if (symbols) { + for (const auto &bs : CutterPVector(symbols)) { QString type = QString(bs->bind) + " " + QString(bs->type); SymbolDescription symbol; symbol.vaddr = bs->vaddr; @@ -3202,11 +3205,13 @@ QList CutterCore::getAllSymbols() symbol.type = QString(bs->type); ret << symbol; } + } + const RzList *entries = rz_bin_object_get_entries(core->bin->cur->o); + if (entries) { /* list entrypoints as symbols too */ int n = 0; - RzBinAddr *entry; - CutterRzListForeach (core->bin->cur->o->entries, it, RzBinAddr, entry) { + for (const auto &entry : CutterRzList(entries)) { SymbolDescription symbol; symbol.vaddr = entry->vaddr; symbol.name = QString("entry") + QString::number(n++); @@ -3341,8 +3346,9 @@ QList CutterCore::getAllStrings() if (!obj) { return {}; } - RzList *l = rz_core_bin_whole_strings(core, bf); - if (!l) { + + RzPVector *strings = rz_core_bin_whole_strings(core, bf); + if (!strings) { return {}; } @@ -3353,7 +3359,7 @@ QList CutterCore::getAllStrings() opt.esc_double_quotes = true; QList ret; - for (const auto &str : CutterRzList(l)) { + for (const auto &str : CutterPVector(strings)) { auto section = obj ? rz_bin_get_section_at(obj, str->paddr, 0) : NULL; StringDescription string;