diff options
author | Oleksiy Vyalov <ovyalov@google.com> | 2015-02-19 17:58:04 +0000 |
---|---|---|
committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-02-19 17:58:04 +0000 |
commit | 8bc34f4d96a4b6cf736dad96bc83156b3014bb53 (patch) | |
tree | a2118ed2b376f676818ab883fbc68ff115d8282f /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp | |
parent | f08a3ccf50791e4f3d05341754633ed7fc6371aa (diff) | |
download | bcm5719-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.cpp | 7 |
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 |