Fixed the issue that was causing our monitor process threads to crash, it
turned out to be unitialized data in the ProcessLaunchInfo default constructor.
Turning on MallocScribble in the environment helped track this down.
When we launch and attach using the host layer, we now inform the process that
it shouldn't detach when by calling an accessor.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144882 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 1aa3c92..95d452f 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1171,6 +1171,9 @@
{
// thread in big endian hex
tid = Args::StringToUInt32 (value.c_str(), 0, 16);
+ // m_thread_list does have its own mutex, but we need to
+ // hold onto the mutex between the call to m_thread_list.FindThreadByID(...)
+ // and the m_thread_list.AddThread(...) so it doesn't change on us
Mutex::Locker locker (m_thread_list.GetMutex ());
thread_sp = m_thread_list.FindThreadByID(tid, false);
if (!thread_sp)