diff options
author | Andrew MacPherson <andrew.macp@gmail.com> | 2014-04-02 06:57:45 +0000 |
---|---|---|
committer | Andrew MacPherson <andrew.macp@gmail.com> | 2014-04-02 06:57:45 +0000 |
commit | 82aae0d835a33e56ae8881eff301dade55a022c2 (patch) | |
tree | a612a4ebfc3fa9f4e46753d5ab5f6b7168867a84 /lldb/source/Plugins/Process/POSIX | |
parent | b461b1c78566d63aeb0736ae377b6c8117740d49 (diff) | |
download | bcm5719-llvm-82aae0d835a33e56ae8881eff301dade55a022c2.tar.gz bcm5719-llvm-82aae0d835a33e56ae8881eff301dade55a022c2.zip |
Use getpgid() with waitpid() in case the process pgid is not equal to its pid, as is the case with a forked subprocess. Also a couple of fixes for unit test failures from Todd Fiala.
llvm-svn: 205405
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX')
-rw-r--r-- | lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp index 47e11353714..94892b194ca 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -379,6 +379,8 @@ ProcessPOSIX::DoDidExec() void ProcessPOSIX::SendMessage(const ProcessMessage &message) { + Log *log (ProcessPOSIXLog::GetLogIfAllCategoriesSet (POSIX_LOG_PROCESS)); + Mutex::Locker lock(m_message_mutex); Mutex::Locker thread_lock(m_thread_list.GetMutex()); @@ -420,8 +422,14 @@ ProcessPOSIX::SendMessage(const ProcessMessage &message) break; case ProcessMessage::eExitMessage: - assert(thread); - thread->SetState(eStateExited); + if (thread != nullptr) + thread->SetState(eStateExited); + else + { + if (log) + log->Warning ("ProcessPOSIX::%s eExitMessage for TID %" PRIu64 " failed to find a thread to mark as eStateExited, ignoring", __FUNCTION__, message.GetTID ()); + } + // FIXME: I'm not sure we need to do this. if (message.GetTID() == GetID()) { |