[Lldb-commits] [PATCH] D68939: [LLDB] [PECOFF] Use a "pc" vendor name in aarch64 triples

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 14 04:24:25 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: labath, compnerd, aleksandr.urakov.
Herald added subscribers: JDevlieghere, kristof.beyls.
Herald added a project: LLDB.

This matches all other architectures listed in the same file.

This fixes debugging aarch64 executables with lldb-server, which otherwise fails, with log messages like these:

  Target::SetArchitecture changing architecture to aarch64 (aarch64-pc-windows-msvc)
  Target::SetArchitecture Trying to select executable file architecture aarch64 (aarch64-pc-windows-msvc)

ArchSpec::SetArchitecture sets the vendor to llvm::Triple::PC for any coff/win32 combination, and if this doesn't match the triple set by the PECOFF module, things doesn't seem to work with when using lldb-server.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68939

Files:
  lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
  lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml


Index: lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
===================================================================
--- lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
+++ lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
@@ -2,7 +2,7 @@
 # RUN: lldb-test object-file %t | FileCheck %s
 
 # CHECK: Plugin name: pe-coff
-# CHECK: Architecture: aarch64-unknown-windows-msvc
+# CHECK: Architecture: aarch64-pc-windows-msvc
 # CHECK: UUID: 
 # CHECK: Executable: true
 # CHECK: Stripped: false
Index: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -200,7 +200,7 @@
     specs.Append(module_spec);
     break;
   case MachineArm64:
-    spec.SetTriple("aarch64-unknown-windows");
+    spec.SetTriple("aarch64-pc-windows");
     specs.Append(module_spec);
     break;
   default:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68939.224830.patch
Type: text/x-patch
Size: 1012 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191014/8d57929c/attachment.bin>


More information about the lldb-commits mailing list