diff options
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/DebuggerThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/DebuggerThread.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp index da4b375596a..f0e27b08607 100644 --- a/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp +++ b/lldb/source/Plugins/Process/Windows/DebuggerThread.cpp @@ -43,28 +43,22 @@ struct DebugLaunchContext DebuggerThread::DebuggerThread(DebugDelegateSP debug_delegate) : m_debug_delegate(debug_delegate) , m_image_file(nullptr) - , m_launched_event(nullptr) { - m_launched_event = ::CreateEvent(nullptr, TRUE, FALSE, nullptr); } DebuggerThread::~DebuggerThread() { - if (m_launched_event != nullptr) - ::CloseHandle(m_launched_event); } -HostProcess +Error DebuggerThread::DebugLaunch(const ProcessLaunchInfo &launch_info) { Error error; DebugLaunchContext *context = new DebugLaunchContext(this, launch_info); HostThread slave_thread(ThreadLauncher::LaunchThread("lldb.plugin.process-windows.slave[?]", DebuggerThreadRoutine, context, &error)); - if (error.Success()) - ::WaitForSingleObject(m_launched_event, INFINITE); - return m_process; + return error; } lldb::thread_result_t @@ -95,7 +89,10 @@ DebuggerThread::DebuggerThreadRoutine(const ProcessLaunchInfo &launch_info) if (error.Success()) DebugLoop(); else - SetEvent(m_launched_event); + { + ProcessMessageDebuggerError message(m_process, error, 0); + m_debug_delegate->OnDebuggerError(message); + } return 0; } @@ -175,7 +172,8 @@ DebuggerThread::HandleCreateProcessEvent(const CREATE_PROCESS_DEBUG_INFO &info, ((HostThreadWindows &)m_main_thread.GetNativeThread()).SetOwnsHandle(false); m_image_file = info.hFile; - SetEvent(m_launched_event); + ProcessMessageDebuggerConnected message(m_process); + m_debug_delegate->OnDebuggerConnected(message); return DBG_CONTINUE; } |