[Lldb-commits] [lldb] r234537 - The dyld shared cache class table is not present in the iOS simulator, so do not actually warn to people when running under the simulator

Enrico Granata egranata at apple.com
Thu Apr 9 14:33:57 PDT 2015


Author: enrico
Date: Thu Apr  9 16:33:57 2015
New Revision: 234537

URL: http://llvm.org/viewvc/llvm-project?rev=234537&view=rev
Log:
The dyld shared cache class table is not present in the iOS simulator, so do not actually warn to people when running under the simulator

rdar://20403987


Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp?rev=234537&r1=234536&r2=234537&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp Thu Apr  9 16:33:57 2015
@@ -38,6 +38,7 @@
 #include "lldb/Symbol/TypeList.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/ExecutionContext.h"
+#include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Target.h"
@@ -1577,6 +1578,18 @@ AppleObjCRuntimeV2::WarnIfNoClassesCache
     if (m_noclasses_warning_emitted)
         return;
     
+    static ConstString g_ios_simulator("ios-simulator");
+    
+    if (m_process &&
+        m_process->GetTarget().GetPlatform() &&
+        m_process->GetTarget().GetPlatform()->GetPluginName() == g_ios_simulator)
+    {
+        // the iOS simulator does not have the objc_opt_ro class table
+        // so don't actually complain to the user
+        m_noclasses_warning_emitted = true;
+        return;
+    }
+    
     Debugger &debugger(GetProcess()->GetTarget().GetDebugger());
     
     if (debugger.GetAsyncOutputStream())





More information about the lldb-commits mailing list