[Lldb-commits] [lldb] r125668 - in /lldb/trunk/source/Target: Process.cpp Target.cpp
jingham at apple.com
Wed Feb 16 09:54:55 PST 2011
Date: Wed Feb 16 11:54:55 2011
New Revision: 125668
Destroy the dynamic loader plugin in Process::Finalize. If you wait till the auto_ptr gets deleted in the normal course of things the real process class will have been destroyed already, and it's hard to shut down the dynamic loader without accessing some process pure virtual method.
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Feb 16 11:54:55 2011
@@ -279,6 +279,11 @@
// Do any cleanup needed prior to being destructed... Subclasses
// that override this method should call this superclass method as well.
+ // We need to destroy the loader before the derived Process class gets destroyed
+ // since it is very likely that undoing the loader will require access to the real process.
+ if (m_dyld_ap.get() != NULL)
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Wed Feb 16 11:54:55 2011
@@ -98,8 +98,8 @@
// Do any cleanup of the target we need to do between process instances.
// NB It is better to do this before destroying the process in case the
More information about the lldb-commits