summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index fb6614d3f67..8968c755bc4 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -279,6 +279,11 @@ Process::Finalize()
{
// 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)
+ m_dyld_ap.reset();
}
void
OpenPOWER on IntegriCloud