diff options
author | Greg Clayton <gclayton@apple.com> | 2012-04-18 21:16:06 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-04-18 21:16:06 +0000 |
commit | af54653c3238fb33a9b50969f5063b6c52fbca47 (patch) | |
tree | 742e095f953f2cf1d2c7079d266893883ced1b2a /lldb/source/Plugins | |
parent | b54f86aa9d6a4a60430289c2bba9d5e605000fd0 (diff) | |
download | bcm5719-llvm-af54653c3238fb33a9b50969f5063b6c52fbca47.tar.gz bcm5719-llvm-af54653c3238fb33a9b50969f5063b6c52fbca47.zip |
Make sure EmulateInstructionARM doesn't have to have "armv4", "armv6", "armv7" as the exact architecture name, the arch name can just start with any of these strings. We need to be able to recognize different variants that might come along and not fail to backtrace completely (which happens when we aren't able to find an architecture that matches) when we don't have exact matches.
llvm-svn: 155045
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r-- | lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index c54e212797e..4f09f00ae9d 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -12780,18 +12780,18 @@ EmulateInstructionARM::SetArchitecture (const ArchSpec &arch) if (arch_cstr) { if (0 == ::strcasecmp(arch_cstr, "armv4t")) m_arm_isa = ARMv4T; - else if (0 == ::strcasecmp(arch_cstr, "armv4")) m_arm_isa = ARMv4; else if (0 == ::strcasecmp(arch_cstr, "armv5tej")) m_arm_isa = ARMv5TEJ; else if (0 == ::strcasecmp(arch_cstr, "armv5te")) m_arm_isa = ARMv5TE; else if (0 == ::strcasecmp(arch_cstr, "armv5t")) m_arm_isa = ARMv5T; else if (0 == ::strcasecmp(arch_cstr, "armv6k")) m_arm_isa = ARMv6K; - else if (0 == ::strcasecmp(arch_cstr, "armv6")) m_arm_isa = ARMv6; else if (0 == ::strcasecmp(arch_cstr, "armv6t2")) m_arm_isa = ARMv6T2; - else if (0 == ::strcasecmp(arch_cstr, "armv7")) m_arm_isa = ARMv7; else if (0 == ::strcasecmp(arch_cstr, "armv7s")) m_arm_isa = ARMv7S; - else if (0 == ::strcasecmp(arch_cstr, "armv8")) m_arm_isa = ARMv8; else if (0 == ::strcasecmp(arch_cstr, "arm")) m_arm_isa = ARMvAll; else if (0 == ::strcasecmp(arch_cstr, "thumb")) m_arm_isa = ARMvAll; + else if (0 == ::strncasecmp(arch_cstr,"armv4", 5)) m_arm_isa = ARMv4; + else if (0 == ::strncasecmp(arch_cstr,"armv6", 5)) m_arm_isa = ARMv6; + else if (0 == ::strncasecmp(arch_cstr,"armv7", 5)) m_arm_isa = ARMv7; + else if (0 == ::strncasecmp(arch_cstr,"armv8", 5)) m_arm_isa = ARMv8; } return m_arm_isa != 0; } |