diff options
author | Jason Molenda <jmolenda@apple.com> | 2018-10-23 23:45:56 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2018-10-23 23:45:56 +0000 |
commit | df9f796fbb91fd9c16fab8eb6535f0f5b937e452 (patch) | |
tree | 444dee36bfb35451aaa0844298afd178914e5813 /lldb/source/Target/Platform.cpp | |
parent | 5fa1e35bcc99dbdeee4e966e21670f9d537c79f7 (diff) | |
download | bcm5719-llvm-df9f796fbb91fd9c16fab8eb6535f0f5b937e452.tar.gz bcm5719-llvm-df9f796fbb91fd9c16fab8eb6535f0f5b937e452.zip |
Support nwere versions of the Segger J-Link jtag board software.
Add support in ProcessGDBRemote::GetGDBServerRegisterInfo
for recognizing a generic "arm" architecture that will be used if
nothing better is available so that we don't ignore the register
definitions if we didn't already have an architecture set.
Also in ProcessGDBRemote::DoConnectRemote don't set the target
arch unless we have a valid architecture to set it to.
Platform::ConnectProcess will try to get the current target's
architecture, or the default architecture, when creating the
target for the connection to be attempted. If lldb was started
with a target binary, we want to create this target with that
architecture in case the remote gdb stub doesn't supply a
qHostInfo arch.
Add logging to Target::MergeArchitecture.
<rdar://problem/34916465>
llvm-svn: 345106
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r-- | lldb/source/Target/Platform.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index 07f1e47c6a4..6c005feee1a 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -1820,9 +1820,19 @@ lldb::ProcessSP Platform::ConnectProcess(llvm::StringRef connect_url, error.Clear(); if (!target) { + ArchSpec arch; + if (target && target->GetArchitecture().IsValid()) + arch = target->GetArchitecture(); + else + arch = Target::GetDefaultArchitecture(); + + const char *triple = ""; + if (arch.IsValid()) + triple = arch.GetTriple().getTriple().c_str(); + TargetSP new_target_sp; error = debugger.GetTargetList().CreateTarget( - debugger, "", "", eLoadDependentsNo, nullptr, new_target_sp); + debugger, "", triple, eLoadDependentsNo, nullptr, new_target_sp); target = new_target_sp.get(); } |