Add support to get the shared cache information from the new
debugserver jGetSharedCacheInfo packet instead of reading 
the dyld internal data structures directly.  This code is 
(currently) only used for ios native lldb's - I should really
move this ObjectFileMachO::GetProcessSharedCacheUUID method
somewhere else, it makes less and less sense being in the
file reader.

<rdar://problem/25251243> 

llvm-svn: 276369
diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
index bc1cc62..244313a 100644
--- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
+++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
@@ -480,6 +480,13 @@
             }
         }
     }
+    else
+    {
+        // If we were unable to find _dyld_global_lock_held in any modules, or it is not loaded into
+        // memory yet, we may be at process startup (sitting at _dyld_start) - so we should not allow
+        // dlopen calls.
+        error.SetErrorToGenericError();
+    }
     return error;
 }