From 3f57216ca45258e4dbae7f0490530dcaa52a6b52 Mon Sep 17 00:00:00 2001 From: Omair Javaid Date: Tue, 14 Apr 2015 07:30:20 +0000 Subject: Adds Register Context Linux/POSIX for ARM Architecture This patch is major step towards supporting lldb on ARM. This adds all the required bits to support register manipulation on Linux Arm. Also adds utility enumerations, definitions and register context classes for arm. llvm-svn: 234870 --- lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp') diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index 240803ab9559..455caa1789d4 100644 --- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -13,6 +13,7 @@ #include #include "NativeProcessLinux.h" +#include "NativeRegisterContextLinux_arm.h" #include "NativeRegisterContextLinux_arm64.h" #include "NativeRegisterContextLinux_x86_64.h" #include "NativeRegisterContextLinux_mips64.h" @@ -29,6 +30,7 @@ #include "Plugins/Process/POSIX/CrashReason.h" +#include "Plugins/Process/Utility/RegisterContextLinux_arm.h" #include "Plugins/Process/Utility/RegisterContextLinux_arm64.h" #include "Plugins/Process/Utility/RegisterContextLinux_i386.h" #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h" @@ -184,6 +186,10 @@ NativeThreadLinux::GetRegisterContext () assert((HostInfo::GetArchitecture ().GetAddressByteSize() == 8) && "Register setting path assumes this is a 64-bit host"); reg_interface = static_cast(new RegisterContextLinux_arm64(target_arch)); break; + case llvm::Triple::arm: + assert(HostInfo::GetArchitecture ().GetAddressByteSize() == 4); + reg_interface = static_cast(new RegisterContextLinux_arm(target_arch)); + break; case llvm::Triple::x86: case llvm::Triple::x86_64: if (HostInfo::GetArchitecture().GetAddressByteSize() == 4) @@ -242,6 +248,12 @@ NativeThreadLinux::GetRegisterContext () m_reg_context_sp.reset (new NativeRegisterContextLinux_arm64(*this, concrete_frame_idx, reg_interface)); break; } + case llvm::Triple::arm: + { + const uint32_t concrete_frame_idx = 0; + m_reg_context_sp.reset (new NativeRegisterContextLinux_arm(*this, concrete_frame_idx, reg_interface)); + break; + } case llvm::Triple::x86: case llvm::Triple::x86_64: { -- cgit v1.2.3