summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-02-19 17:58:04 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-02-19 17:58:04 +0000
commit8bc34f4d96a4b6cf736dad96bc83156b3014bb53 (patch)
treea2118ed2b376f676818ab883fbc68ff115d8282f /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parentf08a3ccf50791e4f3d05341754633ed7fc6371aa (diff)
downloadbcm5719-llvm-8bc34f4d96a4b6cf736dad96bc83156b3014bb53.tar.gz
bcm5719-llvm-8bc34f4d96a4b6cf736dad96bc83156b3014bb53.zip
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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 1334ae1551b..833040bdf67 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -99,6 +99,13 @@ GDBRemoteCommunicationServerLLGS::GDBRemoteCommunicationServerLLGS(
//----------------------------------------------------------------------
GDBRemoteCommunicationServerLLGS::~GDBRemoteCommunicationServerLLGS()
{
+ Mutex::Locker locker (m_debugged_process_mutex);
+
+ if (m_debugged_process_sp)
+ {
+ m_debugged_process_sp->Terminate ();
+ m_debugged_process_sp.reset ();
+ }
}
void
OpenPOWER on IntegriCloud