<rdar://problem/11202426> 

Work around a deadlocking issue where "SBDebugger::MemoryPressureDetected ()" is being called and is causing a deadlock. We now just try and get the lock when trying to trim down the unique modules so we don't deadlock debugger GUI programs until we can find the root cause.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154339 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectTarget.cpp b/source/Commands/CommandObjectTarget.cpp
index 17d5fd5..ec48de6 100644
--- a/source/Commands/CommandObjectTarget.cpp
+++ b/source/Commands/CommandObjectTarget.cpp
@@ -520,7 +520,8 @@
             // the global shared module list
             if (m_cleanup_option.GetOptionValue ())
             {
-                ModuleList::RemoveOrphanSharedModules();
+                const bool mandatory = true;
+                ModuleList::RemoveOrphanSharedModules(mandatory);
             }
             result.GetOutputStream().Printf("%u targets deleted.\n", (uint32_t)num_targets_to_delete);
             result.SetStatus(eReturnStatusSuccessFinishResult);