diff --git a/src/Cutter.cpp b/src/Cutter.cpp index 6465ddb2..c059f439 100644 --- a/src/Cutter.cpp +++ b/src/Cutter.cpp @@ -1253,7 +1253,6 @@ void CutterCore::setSettings() setConfig("anal.hasnext", false); setConfig("asm.lines.call", false); setConfig("anal.autoname", true); - setConfig("anal.jmptbl", false); setConfig("cfg.fortunes.tts", false); diff --git a/src/widgets/DisassemblerGraphView.cpp b/src/widgets/DisassemblerGraphView.cpp index e11b3cd3..c25bdc0c 100644 --- a/src/widgets/DisassemblerGraphView.cpp +++ b/src/widgets/DisassemblerGraphView.cpp @@ -233,6 +233,21 @@ void DisassemblerGraphView::loadCurrentGraph() } 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(); for (int opIndex = 0; opIndex < opArray.size(); opIndex++) { QJsonObject op = opArray[opIndex].toObject();