diff --git a/core/debuggercontroller.cpp b/core/debuggercontroller.cpp index 723a527..4fd1226 100644 --- a/core/debuggercontroller.cpp +++ b/core/debuggercontroller.cpp @@ -161,7 +161,7 @@ DebugStopReason DebuggerController::LaunchAndWait() return InternalError; auto reason = LaunchAndWaitInternal(); - if (!m_userRequestedBreak && (reason != ProcessExited) && (reason != InternalError)) + if ((reason != ProcessExited) && (reason != InternalError)) NotifyStopped(reason); m_targetControlMutex.unlock(); @@ -201,7 +201,7 @@ DebugStopReason DebuggerController::AttachAndWait() return InternalError; auto reason = AttachAndWaitInternal(); - if (!m_userRequestedBreak && (reason != ProcessExited) && (reason != InternalError)) + if ((reason != ProcessExited) && (reason != InternalError)) NotifyStopped(reason); m_targetControlMutex.unlock(); @@ -241,7 +241,7 @@ DebugStopReason DebuggerController::ConnectAndWait() return InternalError; auto reason = ConnectAndWaitInternal(); - if (!m_userRequestedBreak && (reason != ProcessExited) && (reason != InternalError)) + if ((reason != ProcessExited) && (reason != InternalError)) NotifyStopped(reason); m_targetControlMutex.unlock(); @@ -590,7 +590,6 @@ DebugStopReason DebuggerController::StepIntoReverseIL(BNFunctionGraphType il) DebugStopReason DebuggerController::StepIntoReverseAndWaitInternal() { - m_userRequestedBreak = false; // TODO: check if StepInto() succeeds return ExecuteAdapterAndWait(DebugAdapterStepIntoReverse); } @@ -921,8 +920,6 @@ DebugStopReason DebuggerController::EmulateStepReturnAndWait() DebugStopReason DebuggerController::StepReturnAndWaitInternal() { - m_userRequestedBreak = false; - if (true /* StepReturnAvailable() */) { return ExecuteAdapterAndWait(DebugAdapterStepReturn); @@ -937,8 +934,6 @@ DebugStopReason DebuggerController::StepReturnAndWaitInternal() DebugStopReason DebuggerController::StepReturnReverseAndWaitInternal() { - m_userRequestedBreak = false; - if (true /* StepReturnReverseAvailable() */) { return ExecuteAdapterAndWait(DebugAdapterStepReturnReverse); @@ -998,8 +993,6 @@ DebugStopReason DebuggerController::StepReturnReverseAndWait() DebugStopReason DebuggerController::RunToAndWaitInternal(const std::vector& remoteAddresses) { - m_userRequestedBreak = false; - for (uint64_t remoteAddress : remoteAddresses) { if (!m_state->GetBreakpoints()->ContainsAbsolute(remoteAddress)) @@ -1266,7 +1259,9 @@ bool DebuggerController::Pause() DebugStopReason DebuggerController::PauseAndWaitInternal() { m_userRequestedBreak = true; - return ExecuteAdapterAndWait(DebugAdapterPause); + auto ret = ExecuteAdapterAndWait(DebugAdapterPause); + m_userRequestedBreak = false; + return ret; } @@ -1280,20 +1275,17 @@ DebugStopReason DebuggerController::PauseAndWait() DebugStopReason DebuggerController::GoAndWaitInternal() { - m_userRequestedBreak = false; return ExecuteAdapterAndWait(DebugAdapterGo); } DebugStopReason DebuggerController::GoReverseAndWaitInternal() { - m_userRequestedBreak = false; return ExecuteAdapterAndWait(DebugAdapterGoReverse); } DebugStopReason DebuggerController::StepIntoAndWaitInternal() { - m_userRequestedBreak = false; // TODO: check if StepInto() succeeds return ExecuteAdapterAndWait(DebugAdapterStepInto); } @@ -1343,8 +1335,6 @@ DebugStopReason DebuggerController::EmulateStepOverAndWait() DebugStopReason DebuggerController::StepOverAndWaitInternal() { - m_userRequestedBreak = false; - if (true /* StepOverAvailable() */) { return ExecuteAdapterAndWait(DebugAdapterStepOver); @@ -1358,8 +1348,6 @@ DebugStopReason DebuggerController::StepOverAndWaitInternal() DebugStopReason DebuggerController::StepOverReverseAndWaitInternal() { - m_userRequestedBreak = false; - if (true /* StepOverAvailable() */) { return ExecuteAdapterAndWait(DebugAdapterStepOverReverse);