[Lldb-commits] [PATCH] D107179: [lldb] Fix remote macOS debugging on Apple Silicon

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 30 09:39:32 PDT 2021


JDevlieghere created this revision.
JDevlieghere added a reviewer: jasonmolenda.
Herald added a subscriber: kristof.beyls.
JDevlieghere requested review of this revision.

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.


https://reviews.llvm.org/D107179

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


Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
===================================================================
--- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -555,21 +555,21 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107179.363127.patch
Type: text/x-patch
Size: 1264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210730/9bd5db3d/attachment-0001.bin>


More information about the lldb-commits mailing list