diff options
author | Zachary Turner <zturner@google.com> | 2014-11-10 22:32:18 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-11-10 22:32:18 +0000 |
commit | 3985f891a3b6fa9fcbf3c44d629722778698e6a2 (patch) | |
tree | 18378a9325653c269bf3314f590fbd98032682c7 /lldb/source/Plugins/Process/Windows/DebuggerThread.cpp | |
parent | ba80da60c806bc2d7ae65bc557b519ebb2772901 (diff) | |
download | bcm5719-llvm-3985f891a3b6fa9fcbf3c44d629722778698e6a2.tar.gz bcm5719-llvm-3985f891a3b6fa9fcbf3c44d629722778698e6a2.zip |
[ProcessWindows] Notify process plugin when the launch succeeds.
llvm-svn: 221637
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; } |