From f1c1276709479da771a5038f78a1f22f173dde31 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Thu, 23 Mar 2023 17:31:54 +0800 Subject: [PATCH] Make the launch operation async for dbgeng adapter --- core/adapters/dbgengadapter.cpp | 4 ++-- core/adapters/dbgengadapter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/adapters/dbgengadapter.cpp b/core/adapters/dbgengadapter.cpp index 29f1c09a..7d738707 100644 --- a/core/adapters/dbgengadapter.cpp +++ b/core/adapters/dbgengadapter.cpp @@ -412,7 +412,6 @@ bool DbgEngAdapter::ExecuteWithArgsInternal(const std::string& path, const std:: { if (this->m_debugControl->SetExecutionStatus(DEBUG_STATUS_GO) != S_OK) return false; - Wait(); } return true; @@ -421,6 +420,7 @@ bool DbgEngAdapter::ExecuteWithArgsInternal(const std::string& path, const std:: void DbgEngAdapter::EngineLoop() { + m_lastExecutionStatus = DEBUG_STATUS_NO_DEBUGGEE; bool finished = false; while (true) { @@ -487,7 +487,7 @@ void DbgEngAdapter::EngineLoop() Wait(); } - m_lastExecutionStatus = DEBUG_STATUS_BREAK; + m_lastExecutionStatus = DEBUG_STATUS_NO_DEBUGGEE; } bool DbgEngAdapter::AttachInternal(std::uint32_t pid) diff --git a/core/adapters/dbgengadapter.h b/core/adapters/dbgengadapter.h index 450b70c3..4c0b1db4 100644 --- a/core/adapters/dbgengadapter.h +++ b/core/adapters/dbgengadapter.h @@ -123,7 +123,7 @@ namespace BinaryNinjaDebugger { std::vector m_debug_breakpoints {}; bool m_lastOperationIsStepInto = false; - uint64_t m_lastExecutionStatus = DEBUG_STATUS_BREAK; + uint64_t m_lastExecutionStatus = DEBUG_STATUS_NO_DEBUGGEE; unsigned long m_exitCode {};