Prevent LLGS from crashing when exiting - make NativeProcessLinux to wait until ThreadStateCoordinator is fully stopped before entering ~NativeProcessLinux.
http://reviews.llvm.org/D7692
llvm-svn: 229875
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index a72b6a2..068c402 100644
--- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1453,7 +1453,8 @@
}
}
-NativeProcessLinux::~NativeProcessLinux()
+void
+NativeProcessLinux::Terminate ()
{
StopMonitor();
}
@@ -3637,6 +3638,7 @@
// Tell the coordinator we're done. This will cause the coordinator
// run loop thread to exit when the processing queue hits this message.
m_coordinator_up->StopCoordinator ();
+ m_coordinator_thread.Join (nullptr);
}
bool