From 753406221b55b95141c8c1239660dc4db4e35ea5 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 30 Sep 2011 03:29:05 +0000 Subject: [PATCH] After deleting a target, clear the target object and remove orphaned modules. llvm-svn: 140843 --- lldb/source/API/SBDebugger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp index 0f5472a9be31..f97d3f9852b6 100644 --- a/lldb/source/API/SBDebugger.cpp +++ b/lldb/source/API/SBDebugger.cpp @@ -614,6 +614,8 @@ SBDebugger::DeleteTarget (lldb::SBTarget &target) { // No need to lock, the target list is thread safe result = m_opaque_sp->GetTargetList().DeleteTarget (target.m_opaque_sp); + target.Clear(); + ModuleList::RemoveOrphanSharedModules(); } LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));