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

Update Rizin to the latest dev #3298

Merged
merged 3 commits into from
Feb 21, 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
2 changes: 1 addition & 1 deletion rizin
Submodule rizin updated 234 files
21 changes: 6 additions & 15 deletions src/core/Cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,11 +722,10 @@ PRzAnalysisBytes CutterCore::getRzAnalysisBytesSingle(RVA addr)
rz_io_read_at(core->io, addr, buf, sizeof(buf));

auto seek = seekTemp(addr);
auto vec = fromOwned(rz_core_analysis_bytes(core, addr, buf, sizeof(buf), 1));
auto abiter = fromOwned(rz_core_analysis_bytes(core, addr, buf, sizeof(buf), 1));
auto ab =
abiter ? reinterpret_cast<RzAnalysisBytes *>(rz_iterator_next(abiter.get())) : nullptr;

auto ab = vec && rz_pvector_len(vec.get()) > 0
? reinterpret_cast<RzAnalysisBytes *>(rz_pvector_pop_front(vec.get()))
: nullptr;
return { ab, rz_analysis_bytes_free };
}

Expand Down Expand Up @@ -1027,18 +1026,10 @@ RVA CutterCore::nextOpAddr(RVA startAddr, int count)
{
CORE_LOCK();
auto seek = seekTemp(startAddr);
auto vec = fromOwned(rz_core_analysis_bytes(core, core->offset, core->block,
(int)core->blocksize, count + 1));
auto consumed =
rz_core_analysis_ops_size(core, core->offset, core->block, (int)core->blocksize, count);

RVA addr = startAddr + 1;
if (!vec) {
return addr;
}
auto ab = reinterpret_cast<RzAnalysisBytes *>(rz_pvector_tail(vec.get()));
if (!(ab && ab->op)) {
return addr;
}
addr = ab->op->addr;
RVA addr = startAddr + consumed;
return addr;
}

Expand Down
6 changes: 6 additions & 0 deletions src/core/RizinCpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ static inline auto fromOwned(RZ_OWN RzList *data) -> UniquePtrCP<decltype(data),
return { data, {} };
}

static inline auto fromOwned(RZ_OWN RzIterator *data)
-> UniquePtrCP<decltype(data), &rz_iterator_free>
{
return { data, {} };
}

// Rizin list iteration macros
// deprecated, prefer using CutterPVector and CutterRzList instead
#define CutterRzListForeach(list, it, type, x) \
Expand Down
4 changes: 2 additions & 2 deletions src/widgets/GraphvizLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void GraphvizLayout::CalculateLayout(std::unordered_map<ut64, GraphBlock> &block

std::unordered_map<ut64, Agnode_t *> nodes;
for (const auto &block : blocks) {
nodes[block.first] = agnode(g, nullptr, TRUE);
nodes[block.first] = agnode(g, nullptr, true);
}

std::vector<std::string> strc;
Expand Down Expand Up @@ -143,7 +143,7 @@ void GraphvizLayout::CalculateLayout(std::unordered_map<ut64, GraphBlock> &block
if (v == nodes.end()) {
continue;
}
auto e = agedge(g, u, v->second, nullptr, TRUE);
auto e = agedge(g, u, v->second, nullptr, true);
edges[{ blockIt.first, edge.target }] = e;
if (loopEdges.find({ blockIt.first, edge.target }) != loopEdges.end()) {
agxset(e, constraintAttr, STR("0"));
Expand Down
Loading