Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h +++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.h @@ -60,7 +60,9 @@ bool ModuleIsExcludedForUnconstrainedSearches( lldb_private::Target &target, const lldb::ModuleSP &module_sp) override; - void ARMGetSupportedArchitectures(std::vector &archs); + void + ARMGetSupportedArchitectures(std::vector &archs, + llvm::Optional os = {}); void x86GetSupportedArchitectures(std::vector &archs); Index: lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -644,7 +644,7 @@ /// distinct names (e.g. armv7f) but armv7 binaries run fine on an armv7f /// processor. void PlatformDarwin::ARMGetSupportedArchitectures( - std::vector &archs) { + std::vector &archs, llvm::Optional os) { const ArchSpec system_arch = GetSystemArchitecture(); const ArchSpec::Core system_core = system_arch.GetCore(); @@ -654,6 +654,8 @@ llvm::Triple triple; triple.setArchName(compatible_arch); triple.setVendor(llvm::Triple::VendorType::Apple); + if (os) + triple.setOS(*os); archs.push_back(ArchSpec(triple)); } } Index: lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp +++ lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp @@ -137,15 +137,13 @@ std::vector result; #if defined(__arm__) || defined(__arm64__) || defined(__aarch64__) // macOS for ARM64 support both native and translated x86_64 processes - ARMGetSupportedArchitectures(result); + ARMGetSupportedArchitectures(result, llvm::Triple::MacOSX); // We can't use x86GetSupportedArchitectures() because it uses // the system architecture for some of its return values and also // has a 32bits variant. result.push_back(ArchSpec("x86_64-apple-macosx")); result.push_back(ArchSpec("x86_64-apple-ios-macabi")); - result.push_back(ArchSpec("arm64-apple-ios")); - result.push_back(ArchSpec("arm64e-apple-ios")); #else x86GetSupportedArchitectures(result); #endif Index: lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp +++ lldb/source/Plugins/Platform/MacOSX/PlatformRemoteMacOSX.cpp @@ -127,7 +127,7 @@ std::vector PlatformRemoteMacOSX::GetSupportedArchitectures() { // macOS for ARM64 support both native and translated x86_64 processes std::vector result; - ARMGetSupportedArchitectures(result); + ARMGetSupportedArchitectures(result, llvm::Triple::MacOSX); // We can't use x86GetSupportedArchitectures() because it uses // the system architecture for some of its return values and also Index: lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp =================================================================== --- lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp +++ lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp @@ -135,7 +135,7 @@ std::vector PlatformRemoteiOS::GetSupportedArchitectures() { std::vector result; - ARMGetSupportedArchitectures(result); + ARMGetSupportedArchitectures(result, llvm::Triple::IOS); return result; }