[Lldb-commits] [lldb] 7ad854c - [lldb] Fix remote macOS debugging on Apple Silicon

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 30 13:14:17 PDT 2021


Author: Jonas Devlieghere
Date: 2021-07-30T13:14:10-07:00
New Revision: 7ad854c41e2b08b8cd6aae1d3b6f22125512585b

URL: https://github.com/llvm/llvm-project/commit/7ad854c41e2b08b8cd6aae1d3b6f22125512585b
DIFF: https://github.com/llvm/llvm-project/commit/7ad854c41e2b08b8cd6aae1d3b6f22125512585b.diff

LOG: [lldb] Fix remote macOS debugging on Apple Silicon

Update ARMGetSupportedArchitectureAtIndex to consider remote macOS
debugging. Currently, it defaults to an iOS triple when IsHost() returns
false. This fixes TestPlatformSDK.py on Apple Silicon.

Differential revision: https://reviews.llvm.org/D107179

Added: 
    

Modified: 
    lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 51ff2a6ce12d0..62da060951392 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -555,21 +555,21 @@ bool PlatformDarwin::x86GetSupportedArchitectureAtIndex(uint32_t idx,
   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.
-
+/// 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());
 
-// When lldb is running on a watch or tv, set the arch OS name appropriately.
 #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
 #define OSNAME "tvos"
 #elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
 #define OSNAME "watchos"
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
 #define OSNAME "bridgeos"
+#elif defined(TARGET_OS_OSX) && TARGET_OS_OSX == 1
+#define OSNAME "macosx"
 #else
 #define OSNAME "ios"
 #endif


        


More information about the lldb-commits mailing list