14#include "llvm/Support/Compiler.h"
22#define GPR_OFFSET(idx) ((idx)*4)
23#define FPU_OFFSET(idx) ((idx)*4 + sizeof(RegisterInfoPOSIX_arm::GPR))
25 (LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm::FPU, fpscr) + \
26 sizeof(RegisterInfoPOSIX_arm::GPR))
27#define EXC_OFFSET(idx) \
28 ((idx)*4 + sizeof(RegisterInfoPOSIX_arm::GPR) + \
29 sizeof(RegisterInfoPOSIX_arm::FPU))
30#define DBG_OFFSET(reg) \
31 ((LLVM_EXTENSION offsetof(RegisterInfoPOSIX_arm::DBG, reg) + \
32 sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU) + \
33 sizeof(RegisterInfoPOSIX_arm::EXC)))
35#define DEFINE_DBG(reg, i) \
36 #reg, NULL, sizeof(((RegisterInfoPOSIX_arm::DBG *) NULL)->reg[i]), \
37 DBG_OFFSET(reg[i]), eEncodingUint, eFormatHex, \
38 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
39 LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
42#define REG_CONTEXT_SIZE \
43 (sizeof(RegisterInfoPOSIX_arm::GPR) + sizeof(RegisterInfoPOSIX_arm::FPU) + \
44 sizeof(RegisterInfoPOSIX_arm::EXC))
47#define DECLARE_REGISTER_INFOS_ARM_STRUCT
49#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
54 case llvm::Triple::arm:
55 return g_register_infos_arm;
57 assert(
false &&
"Unhandled target architecture.");
65 case llvm::Triple::arm:
66 return static_cast<uint32_t
>(
sizeof(g_register_infos_arm) /
67 sizeof(g_register_infos_arm[0]));
69 assert(
false &&
"Unhandled target architecture.");
95 "g_gpr_regnums_arm has wrong number of register infos");
143 "g_fpu_regnums_arm has wrong number of register infos");
176 uint32_t reg_index)
const {
179 if (reg_index <= fpu_q15)
constexpr size_t k_num_register_sets
static uint32_t GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch)
static const uint32_t g_fpu_regnums_arm[]
static const lldb_private::RegisterInfo * GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch)
static const uint32_t g_gpr_regnums_arm[]
static const RegisterSet g_reg_sets_arm[k_num_register_sets]
size_t GetRegisterSetCount() const override
size_t GetRegisterSetFromRegisterIndex(uint32_t reg_index) const override
size_t GetFPRSize() const override
uint32_t GetRegisterCount() const override
uint32_t m_register_info_count
RegisterInfoPOSIX_arm(const lldb_private::ArchSpec &target_arch)
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) const override
size_t GetGPRSize() const override
const lldb_private::RegisterInfo * GetRegisterInfo() const override
const lldb_private::RegisterInfo * m_register_info_p
An architecture specification class.
llvm::Triple::ArchType GetMachine() const
Returns a machine family for the current architecture.
#define LLDB_INVALID_REGNUM
A class that represents a running process on the host machine.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.