diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index 07d1491..3ce4e0f 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -370,7 +370,10 @@ DebugStopReason DebuggerController::StepIntoIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - LowLevelILFunctionRef llil = func->GetLowLevelIL(); + LowLevelILFunctionRef llil = func->GetLowLevelILIfAvailable(); + if (!llil) + return SingleStep; + size_t start = llil->GetInstructionStart(m_liveView->GetDefaultArchitecture(), newRemoteRip); if (start < llil->GetInstructionCount()) { @@ -397,7 +400,10 @@ DebugStopReason DebuggerController::StepIntoIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - MediumLevelILFunctionRef mlil = func->GetMediumLevelIL(); + MediumLevelILFunctionRef mlil = func->GetMediumLevelILIfAvailable(); + if (!mlil) + return SingleStep; + size_t start = mlil->GetInstructionStart(m_liveView->GetDefaultArchitecture(), newRemoteRip); if (start < mlil->GetInstructionCount()) { @@ -425,7 +431,10 @@ DebugStopReason DebuggerController::StepIntoIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - HighLevelILFunctionRef hlil = func->GetHighLevelIL(); + HighLevelILFunctionRef hlil = func->GetHighLevelILIfAvailable(); + if (!hlil) + return SingleStep; + for (size_t i = 0; i < hlil->GetInstructionCount(); i++) { if (hlil->GetInstruction(i).address == newRemoteRip) @@ -491,7 +500,10 @@ DebugStopReason DebuggerController::StepOverIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - LowLevelILFunctionRef llil = func->GetLowLevelIL(); + LowLevelILFunctionRef llil = func->GetLowLevelILIfAvailable(); + if (!llil) + return SingleStep; + size_t start = llil->GetInstructionStart(m_liveView->GetDefaultArchitecture(), newRemoteRip); if (start < llil->GetInstructionCount()) { @@ -517,7 +529,10 @@ DebugStopReason DebuggerController::StepOverIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - MediumLevelILFunctionRef mlil = func->GetMediumLevelIL(); + MediumLevelILFunctionRef mlil = func->GetMediumLevelILIfAvailable(); + if (!mlil) + return SingleStep; + size_t start = mlil->GetInstructionStart(m_liveView->GetDefaultArchitecture(), newRemoteRip); if (start < mlil->GetInstructionCount()) { @@ -545,7 +560,10 @@ DebugStopReason DebuggerController::StepOverIL(BNFunctionGraphType il) for (FunctionRef& func : functions) { - HighLevelILFunctionRef hlil = func->GetHighLevelIL(); + HighLevelILFunctionRef hlil = func->GetHighLevelILIfAvailable(); + if (!hlil) + return SingleStep; + for (size_t i = 0; i < hlil->GetInstructionCount(); i++) { if (hlil->GetInstruction(i).address == newRemoteRip)