[Lldb-commits] [PATCH] Use getProcessTriple inside HostInfoBase::ComputeHostArchitectureSupport instead of getDefaultTargetTriple

Oleksiy Vyalov ovyalov at google.com
Wed Feb 25 17:38:50 PST 2015


Hi vharron, clayborg, tberghammer,

Make lldb (lldb-server or debugserver) to get architecture information using getProcessTriple instead of getDefaultTargetTriple.
It seems getProcessTriple produces more accurate results - when cross-compiling for Android x86 (LLVM_TARGET_ARCH=X86) getDefaultTargetTriple yields 'x86_64--linux-android'  whereas getProcessTriple() returns a valid 'i386--linux-android' which is compatible with inferiors' architecture.

http://reviews.llvm.org/D7893

Files:
  source/Host/common/HostInfoBase.cpp

Index: source/Host/common/HostInfoBase.cpp
===================================================================
--- source/Host/common/HostInfoBase.cpp
+++ source/Host/common/HostInfoBase.cpp
@@ -367,7 +367,7 @@
 void
 HostInfoBase::ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_64)
 {
-    llvm::Triple triple(llvm::sys::getDefaultTargetTriple());
+    llvm::Triple triple(llvm::sys::getProcessTriple());
 
     arch_32.Clear();
     arch_64.Clear();

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7893.20720.patch
Type: text/x-patch
Size: 470 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150226/520a11f1/attachment.bin>


More information about the lldb-commits mailing list