[Lldb-commits] [PATCH] D92603: [lldb] Recognize MachO cpu sub-type 2 as arm64

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 3 13:24:06 PST 2020


JDevlieghere created this revision.
JDevlieghere added a reviewer: jasonmolenda.
Herald added subscribers: pzheng, omjavaid, kristof.beyls.
JDevlieghere requested review of this revision.

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.


https://reviews.llvm.org/D92603

Files:
  lldb/source/Utility/ArchSpec.cpp


Index: lldb/source/Utility/ArchSpec.cpp
===================================================================
--- lldb/source/Utility/ArchSpec.cpp
+++ lldb/source/Utility/ArchSpec.cpp
@@ -298,6 +298,8 @@
      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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92603.309351.patch
Type: text/x-patch
Size: 651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20201203/b71da0f5/attachment.bin>


More information about the lldb-commits mailing list