Fixed a crasher where when a ProcessGDBRemote class was being destroyed, it would eventually destroy the dynamic loader (when the lldb_private::Process::m_dynamic_loader_ap destroys itself in the object member destructor chain). The dynamic loader was calling a pure virtual method in Process which was causing a crash. The quick fix is to reset the auto pointer in the ProcessGDBRemote destructor when ProcessGDBRemote is still a valid object with all its pure virtual functions intact.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121704 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index bb36cee..1f0bc14 100644
--- a/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -131,6 +131,8 @@
//----------------------------------------------------------------------
ProcessGDBRemote::~ProcessGDBRemote()
{
+ m_dynamic_loader_ap.reset();
+
if (m_debugserver_thread != LLDB_INVALID_HOST_THREAD)
{
Host::ThreadCancel (m_debugserver_thread, NULL);