[Lldb-commits] [lldb] r146249 - in /lldb/trunk: lldb.xcodeproj/project.pbxproj resources/LLDB-Info.plist source/Plugins/Platform/MacOSX/PlatformDarwin.cpp source/Plugins/Platform/MacOSX/PlatformDarwin.h source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp

Jason Molenda jmolenda at apple.com
Thu Dec 8 23:50:50 PST 2011


Author: jmolenda
Date: Fri Dec  9 01:50:50 2011
New Revision: 146249

URL: http://llvm.org/viewvc/llvm-project?rev=146249&view=rev
Log:
Move the ARM specific arch picker from PlatformRemoteiOS.cpp to
PlatformDarwin.cpp -- call it from both PlatformRemoteiOS.cpp
and the native process PlatformDarwin.cpp when running on an arm
system.

Bump lldb version number to 94.

Modified:
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/resources/LLDB-Info.plist
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Fri Dec  9 01:50:50 2011
@@ -3736,9 +3736,9 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 93;
+				DYLIB_CURRENT_VERSION = 94;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3797,10 +3797,10 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 93;
+				DYLIB_CURRENT_VERSION = 94;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3857,8 +3857,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
-				DYLIB_CURRENT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
+				DYLIB_CURRENT_VERSION = 94;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3887,8 +3887,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
-				DYLIB_CURRENT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
+				DYLIB_CURRENT_VERSION = 94;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3917,8 +3917,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
-				DYLIB_CURRENT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
+				DYLIB_CURRENT_VERSION = 94;
 				EXECUTABLE_EXTENSION = a;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -3995,7 +3995,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4025,10 +4025,10 @@
 			buildSettings = {
 				ALWAYS_SEARCH_USER_PATHS = NO;
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				DEAD_CODE_STRIPPING = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 93;
+				DYLIB_CURRENT_VERSION = 94;
 				EXPORTED_SYMBOLS_FILE = "resources/lldb-framework-exports";
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -4272,7 +4272,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = NO;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
@@ -4303,7 +4303,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 93;
+				CURRENT_PROJECT_VERSION = 94;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
 					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",

Modified: lldb/trunk/resources/LLDB-Info.plist
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/resources/LLDB-Info.plist?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/resources/LLDB-Info.plist (original)
+++ lldb/trunk/resources/LLDB-Info.plist Fri Dec  9 01:50:50 2011
@@ -17,7 +17,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>93</string>
+	<string>94</string>
 	<key>CFBundleName</key>
 	<string>${EXECUTABLE_NAME}</string>
 </dict>

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Fri Dec  9 01:50:50 2011
@@ -501,3 +501,114 @@
     else
         return false;
 }
+
+
+// The architecture selection rules for arm processors
+// These cpu subtypes have distinct names (e.g. armv7f) but armv7 binaries run fine on an armv7f processor.
+
+bool
+PlatformDarwin::ARMGetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
+{
+    ArchSpec system_arch (GetSystemArchitecture());
+    const ArchSpec::Core system_core = system_arch.GetCore();
+    switch (system_core)
+    {
+    default:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
+        case 1: arch.SetTriple ("armv7f-apple-darwin", NULL); return true;
+        case 2: arch.SetTriple ("armv7k-apple-darwin", NULL); return true;
+        case 3: arch.SetTriple ("armv7s-apple-darwin", NULL); return true;
+        case 4: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 5: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 6: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 7: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv7f:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv7f-apple-darwin", NULL); return true;
+        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv7k:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv7k-apple-darwin", NULL); return true;
+        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv7s:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv7s-apple-darwin", NULL); return true;
+        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv7:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
+        case 1: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 3: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 4: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv6:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
+        case 1: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 3: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv5:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
+        case 1: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 2: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+
+    case ArchSpec::eCore_arm_armv4:
+        switch (idx)
+        {
+        case 0: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
+        case 1: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
+        default: break;
+        }
+        break;
+    }
+    arch.Clear();
+    return false;
+}

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h Fri Dec  9 01:50:50 2011
@@ -88,6 +88,8 @@
     virtual bool
     ModuleIsExcludedForNonModuleSpecificSearches (lldb_private::Target &target, const lldb::ModuleSP &module_sp);
                 
+    bool ARMGetSupportedArchitectureAtIndex (uint32_t idx, lldb_private::ArchSpec &arch);
+
 protected:
     lldb::PlatformSP m_remote_platform_sp; // Allow multiple ways to connect to a remote darwin OS
 

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Fri Dec  9 01:50:50 2011
@@ -178,6 +178,10 @@
 bool
 PlatformMacOSX::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
 {
+#if defined (__arm__)
+    return ARMGetSupportedArchitectureAtIndex (idx, arch);
+#endif
+
     if (idx == 0)
     {
         arch = Host::GetArchitecture (Host::eSystemDefaultArchitecture);
@@ -199,4 +203,3 @@
     return false;
 }
 
-

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=146249&r1=146248&r2=146249&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Fri Dec  9 01:50:50 2011
@@ -485,106 +485,5 @@
 bool
 PlatformRemoteiOS::GetSupportedArchitectureAtIndex (uint32_t idx, ArchSpec &arch)
 {
-    ArchSpec system_arch (GetSystemArchitecture());
-    const ArchSpec::Core system_core = system_arch.GetCore();
-    switch (system_core)
-    {
-    default:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
-        case 1: arch.SetTriple ("armv7f-apple-darwin", NULL); return true;
-        case 2: arch.SetTriple ("armv7k-apple-darwin", NULL); return true;
-        case 3: arch.SetTriple ("armv7s-apple-darwin", NULL); return true;
-        case 4: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 5: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 6: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 7: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv7f:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv7f-apple-darwin", NULL); return true;
-        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv7k:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv7k-apple-darwin", NULL); return true;
-        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv7s:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv7s-apple-darwin", NULL); return true;
-        case 1: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 3: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 4: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 5: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv7:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv7-apple-darwin", NULL);  return true;
-        case 1: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 3: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 4: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv6:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv6-apple-darwin", NULL);  return true;
-        case 1: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 3: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv5:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv5-apple-darwin", NULL);  return true;
-        case 1: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 2: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-
-    case ArchSpec::eCore_arm_armv4:
-        switch (idx)
-        {
-        case 0: arch.SetTriple ("armv4-apple-darwin", NULL);  return true;
-        case 1: arch.SetTriple ("arm-apple-darwin", NULL);    return true;
-        default: break;
-        }
-        break;
-    }
-    arch.Clear();
-    return false;
+    return ARMGetSupportedArchitectureAtIndex (idx, arch);
 }





More information about the lldb-commits mailing list