summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-12-13 18:11:18 +0000
committerGreg Clayton <gclayton@apple.com>2010-12-13 18:11:18 +0000
commitc30abdfa7d85656412f6abdad4fe6315f5f47831 (patch)
treeec657ae354c982a0762b7c785f6a0083e8cd988d /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parent8e21a02c19a281821cb21f75b83cb53f87eed65c (diff)
downloadbcm5719-llvm-c30abdfa7d85656412f6abdad4fe6315f5f47831.tar.gz
bcm5719-llvm-c30abdfa7d85656412f6abdad4fe6315f5f47831.zip
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.
llvm-svn: 121704
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index bb36cee5735..1f0bc149833 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -131,6 +131,8 @@ ProcessGDBRemote::ProcessGDBRemote(Target& target, Listener &listener) :
//----------------------------------------------------------------------
ProcessGDBRemote::~ProcessGDBRemote()
{
+ m_dynamic_loader_ap.reset();
+
if (m_debugserver_thread != LLDB_INVALID_HOST_THREAD)
{
Host::ThreadCancel (m_debugserver_thread, NULL);
OpenPOWER on IntegriCloud