diff options
author | Jason Molenda <jmolenda@apple.com> | 2015-08-21 00:13:37 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2015-08-21 00:13:37 +0000 |
commit | 6d9fe8c156f49ca4cd4404473f9115701f9b4581 (patch) | |
tree | d4395a3a7d997e67b74491c78a7f38a49a4dbfd4 /lldb/source/Plugins/Process | |
parent | 6002295c6a7b53e35b012410d6d3240e729b6f65 (diff) | |
download | bcm5719-llvm-6d9fe8c156f49ca4cd4404473f9115701f9b4581.tar.gz bcm5719-llvm-6d9fe8c156f49ca4cd4404473f9115701f9b4581.zip |
The llvm Triple for an armv6m now comes back as llvm::Triple::thumb.
This was breaking disassembly for arm machines that we force to be
thumb mode all the time because we were only checking for llvm::Triple::arm.
i.e.
armv6m (ARM Cortex-M0)
armv7m (ARM Cortex-M3)
armv7em (ARM Cortex-M4)
<rdar://problem/22334522>
llvm-svn: 245645
Diffstat (limited to 'lldb/source/Plugins/Process')
3 files changed, 10 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp index 7c68d0d0782..3bf766e875c 100644 --- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp +++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp @@ -58,6 +58,7 @@ StopInfoMachException::GetDescription () } break; case llvm::Triple::arm: + case llvm::Triple::thumb: switch (m_exc_code) { case 0x101: code_desc = "EXC_ARM_DA_ALIGN"; break; @@ -104,6 +105,7 @@ StopInfoMachException::GetDescription () break; case llvm::Triple::arm: + case llvm::Triple::thumb: if (m_exc_code == 1) code_desc = "EXC_ARM_UNDEFINED"; break; @@ -188,6 +190,7 @@ StopInfoMachException::GetDescription () break; case llvm::Triple::arm: + case llvm::Triple::thumb: switch (m_exc_code) { case 0x101: code_desc = "EXC_ARM_DA_ALIGN"; break; @@ -408,6 +411,7 @@ StopInfoMachException::CreateStopReasonWithMachException break; case llvm::Triple::arm: + case llvm::Triple::thumb: if (exc_code == 0x102) // EXC_ARM_DA_DEBUG { // It's a watchpoint, then, if the exc_sub_code indicates a known/enabled diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 8a00e616262..bb57b3ee9f3 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -1209,6 +1209,7 @@ GDBRemoteCommunicationServerCommon::CreateProcessInfoResponse_DebugServerStyle ( switch (proc_triple.getArch ()) { case llvm::Triple::arm: + case llvm::Triple::thumb: case llvm::Triple::aarch64: ostype = "ios"; break; diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 92027bb2a3b..7627f6e1c8b 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -735,11 +735,12 @@ ProcessGDBRemote::BuildDynamicRegisterInfo (bool force) if (!target_arch.IsValid()) { if (remote_arch.IsValid() - && remote_arch.GetMachine() == llvm::Triple::arm + && (remote_arch.GetMachine() == llvm::Triple::arm || remote_arch.GetMachine() == llvm::Triple::thumb) && remote_arch.GetTriple().getVendor() == llvm::Triple::Apple) m_register_info.HardcodeARMRegisters(from_scratch); } - else if (target_arch.GetMachine() == llvm::Triple::arm) + else if (target_arch.GetMachine() == llvm::Triple::arm + || target_arch.GetMachine() == llvm::Triple::thumb) { m_register_info.HardcodeARMRegisters(from_scratch); } @@ -1250,8 +1251,8 @@ ProcessGDBRemote::DidLaunchOrAttach (ArchSpec& process_arch) // it has, so we really need to take the remote host architecture as our // defacto architecture in this case. - if (process_arch.GetMachine() == llvm::Triple::arm && - process_arch.GetTriple().getVendor() == llvm::Triple::Apple) + if ((process_arch.GetMachine() == llvm::Triple::arm || process_arch.GetMachine() == llvm::Triple::thumb) + && process_arch.GetTriple().getVendor() == llvm::Triple::Apple) { GetTarget().SetArchitecture (process_arch); if (log) |