The dyld shared cache class table is not present in the iOS simulator, so do not...
authorEnrico Granata <egranata@apple.com>
Thu, 9 Apr 2015 21:33:57 +0000 (21:33 +0000)
committerEnrico Granata <egranata@apple.com>
Thu, 9 Apr 2015 21:33:57 +0000 (21:33 +0000)
rdar://20403987

llvm-svn: 234537

lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp

index e6dd4daa57bb56c0e74593f12065ecb2c63c624b..aa40b5e6634ed0fa91e3fc9c3ac59439f697d04d 100644 (file)
@@ -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::WarnIfNoClassesCached ()
     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())