Skip to content

Commit

Permalink
ghidra: Get rid of first_operation. It is redundant w.r.t. ordered_op…
Browse files Browse the repository at this point in the history
…erations.
  • Loading branch information
pgoodman authored and kumarak committed Oct 15, 2024
1 parent b2e286a commit 1b21b57
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions scripts/ghidra/PatchestryDecompileFunctions.java
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,9 @@ private void serialize(HighFunction function, PcodeBlockBasic block) throws Exce

PcodeOp op = null;
Iterator<PcodeOp> op_iterator = block.getIterator();
name("operations").beginObject();
while (op_iterator.hasNext()) {
if (op == null) {
op = op_iterator.next();
name("first_operation").value(label(op));
name("operations").beginObject();
} else {
op = op_iterator.next();
}
op = op_iterator.next();

// NOTE(pag): INDIRECTs seem like a good way of modelling may-
// alias relations, as well as embedding control
Expand All @@ -317,9 +312,7 @@ private void serialize(HighFunction function, PcodeBlockBasic block) throws Exce
serialize(function, block, op);
}
}
if (op != null) {
endObject();
}
endObject();

// List out the operations in their order.
op_iterator = block.getIterator();
Expand Down

0 comments on commit 1b21b57

Please sign in to comment.