[Lldb-commits] [lldb] r121704 - /lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Greg Clayton
gclayton at apple.com
Mon Dec 13 10:11:18 PST 2010
Author: gclayton
Date: Mon Dec 13 12:11:18 2010
New Revision: 121704
URL: http://llvm.org/viewvc/llvm-project?rev=121704&view=rev
Log:
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.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=121704&r1=121703&r2=121704&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Dec 13 12:11:18 2010
@@ -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);
More information about the lldb-commits
mailing list