mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Fix Jump Tables (Fix #574)
This commit is contained in:
parent
9527df8502
commit
f6955e4eab
@ -1253,7 +1253,6 @@ void CutterCore::setSettings()
|
|||||||
setConfig("anal.hasnext", false);
|
setConfig("anal.hasnext", false);
|
||||||
setConfig("asm.lines.call", false);
|
setConfig("asm.lines.call", false);
|
||||||
setConfig("anal.autoname", true);
|
setConfig("anal.autoname", true);
|
||||||
setConfig("anal.jmptbl", false);
|
|
||||||
|
|
||||||
setConfig("cfg.fortunes.tts", false);
|
setConfig("cfg.fortunes.tts", false);
|
||||||
|
|
||||||
|
@ -233,6 +233,21 @@ void DisassemblerGraphView::loadCurrentGraph()
|
|||||||
}
|
}
|
||||||
gb.exits.push_back(block_jump);
|
gb.exits.push_back(block_jump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QJsonObject switchOp = block["switchop"].toObject();
|
||||||
|
if (!switchOp.isEmpty()) {
|
||||||
|
QJsonArray caseArray = switchOp["cases"].toArray();
|
||||||
|
for (QJsonValue caseOpValue : caseArray) {
|
||||||
|
QJsonObject caseOp = caseOpValue.toObject();
|
||||||
|
bool ok;
|
||||||
|
RVA caseJump = caseOp["jump"].toVariant().toULongLong(&ok);
|
||||||
|
if (!ok) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
gb.exits.push_back(caseJump);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QJsonArray opArray = block["ops"].toArray();
|
QJsonArray opArray = block["ops"].toArray();
|
||||||
for (int opIndex = 0; opIndex < opArray.size(); opIndex++) {
|
for (int opIndex = 0; opIndex < opArray.size(); opIndex++) {
|
||||||
QJsonObject op = opArray[opIndex].toObject();
|
QJsonObject op = opArray[opIndex].toObject();
|
||||||
|
Loading…
Reference in New Issue
Block a user