[Lldb-commits] [PATCH] D18621: Allow remote to update individual arch triple components
Francis Ricci via lldb-commits
lldb-commits at lists.llvm.org
Wed Mar 30 14:00:15 PDT 2016
fjricci created this revision.
fjricci added reviewers: clayborg, tfiala, tberghammer.
fjricci added subscribers: sas, lldb-commits.
Herald added subscribers: danalbert, tberghammer, aemerson.
If we determine an OS from the executable, but not an environment,
the existing code will not update the target triple to add an
environment provided by the remote.
This manifests if we have an android exe, where we could parse
arm-*-linux from the ELF, but then the remote gives a triple of
arm-*-linux-android. The existing code will not update the
environment in this case, because the OS has not changed.
http://reviews.llvm.org/D18621
Files:
source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
Index: source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -1220,19 +1220,20 @@
if (new_target_triple.getVendorName().size() == 0)
{
new_target_triple.setVendor (remote_triple.getVendor());
+ }
+ if (new_target_triple.getOSName().size() == 0)
+ {
+ new_target_triple.setOS (remote_triple.getOS());
- if (new_target_triple.getOSName().size() == 0)
- {
- new_target_triple.setOS (remote_triple.getOS());
-
- if (new_target_triple.getEnvironmentName().size() == 0)
- new_target_triple.setEnvironment (remote_triple.getEnvironment());
- }
-
- ArchSpec new_target_arch = target_arch;
- new_target_arch.SetTriple(new_target_triple);
- GetTarget().SetArchitecture(new_target_arch);
}
+ if (new_target_triple.getEnvironmentName().size() == 0)
+ {
+ new_target_triple.setEnvironment (remote_triple.getEnvironment());
+ }
+
+ ArchSpec new_target_arch = target_arch;
+ new_target_arch.SetTriple(new_target_triple);
+ GetTarget().SetArchitecture(new_target_arch);
}
if (log)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18621.52121.patch
Type: text/x-patch
Size: 1721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160330/2a289992/attachment.bin>
More information about the lldb-commits
mailing list