[Lldb-commits] [lldb] 9d9959e - [lldb] Recognize MachO cpu sub-type 2 as arm64
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 3 13:31:38 PST 2020
Author: Jonas Devlieghere
Date: 2020-12-03T13:31:31-08:00
New Revision: 9d9959eeacd7222277b9a4ea82a2f59c2bdec5f7
URL: https://github.com/llvm/llvm-project/commit/9d9959eeacd7222277b9a4ea82a2f59c2bdec5f7
DIFF: https://github.com/llvm/llvm-project/commit/9d9959eeacd7222277b9a4ea82a2f59c2bdec5f7.diff
LOG: [lldb] Recognize MachO cpu sub-type 2 as arm64
Make sure we recognize cpu sub-type 2 as arm64. In reality it's arm64e,
but we don't have the triple for that. Without this patch, we fall back
to unknown-apple-macosx- for the default architecture, which breaks
things like running expressions without a target.
Differential revision: https://reviews.llvm.org/D92603
Added:
Modified:
lldb/source/Utility/ArchSpec.cpp
Removed:
################################################################################
diff --git a/lldb/source/Utility/ArchSpec.cpp b/lldb/source/Utility/ArchSpec.cpp
index c7b56a8385f7..5bbe59034c04 100644
--- a/lldb/source/Utility/ArchSpec.cpp
+++ b/lldb/source/Utility/ArchSpec.cpp
@@ -298,6 +298,8 @@ static const ArchDefinitionEntry g_macho_arch_entries[] = {
SUBTYPE_MASK},
{ArchSpec::eCore_arm_armv7em, llvm::MachO::CPU_TYPE_ARM, 16, UINT32_MAX,
SUBTYPE_MASK},
+ {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 2, UINT32_MAX,
+ SUBTYPE_MASK}, // FIXME: This should be arm64e once the triple exists.
{ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 1, UINT32_MAX,
SUBTYPE_MASK},
{ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 0, UINT32_MAX,
More information about the lldb-commits
mailing list