9#if defined(__arm__) || defined(_M_ARM)
20#include "llvm/ADT/STLExtras.h"
25#define GPR_OFFSET(idx) 0
26#define FPU_OFFSET(idx) 0
28#define EXC_OFFSET(reg) 0
29#define DBG_OFFSET_NAME(reg) 0
31#define DEFINE_DBG(reg, i) \
33 0, DBG_OFFSET_NAME(reg[i]), eEncodingUint, eFormatHex, \
34 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
35 LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
36 LLDB_INVALID_REGNUM }, \
40#define DECLARE_REGISTER_INFOS_ARM_STRUCT
42#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
48uint32_t g_gpr_reg_indices[] = {
53uint32_t g_fpu_reg_indices[] = {
59 fpu_d0, fpu_d1, fpu_d2, fpu_d3, fpu_d4, fpu_d5, fpu_d6, fpu_d7,
60 fpu_d8, fpu_d9, fpu_d10, fpu_d11, fpu_d12, fpu_d13, fpu_d14, fpu_d15,
61 fpu_d16, fpu_d17, fpu_d18, fpu_d19, fpu_d20, fpu_d21, fpu_d22, fpu_d23,
62 fpu_d24, fpu_d25, fpu_d26, fpu_d27, fpu_d28, fpu_d29, fpu_d30, fpu_d31,
64 fpu_q0, fpu_q1, fpu_q2, fpu_q3, fpu_q4, fpu_q5, fpu_q6, fpu_q7,
65 fpu_q8, fpu_q9, fpu_q10, fpu_q11, fpu_q12, fpu_q13, fpu_q14, fpu_q15,
71 {
"General Purpose Registers",
"gpr", std::size(g_gpr_reg_indices),
73 {
"Floating Point Registers",
"fpu", std::size(g_fpu_reg_indices),
78RegisterContextWindows_arm::RegisterContextWindows_arm(
79 Thread &thread, uint32_t concrete_frame_idx)
82RegisterContextWindows_arm::~RegisterContextWindows_arm() {}
84size_t RegisterContextWindows_arm::GetRegisterCount() {
85 return std::size(g_register_infos_arm);
89RegisterContextWindows_arm::GetRegisterInfoAtIndex(
size_t reg) {
91 return &g_register_infos_arm[reg];
95size_t RegisterContextWindows_arm::GetRegisterSetCount() {
96 return std::size(g_register_sets);
99const RegisterSet *RegisterContextWindows_arm::GetRegisterSet(
size_t reg_set) {
100 return &g_register_sets[reg_set];
103bool RegisterContextWindows_arm::ReadRegister(
const RegisterInfo *reg_info,
105 if (!CacheAllRegisterValues())
108 if (reg_info ==
nullptr)
198 reg_value.
SetUInt32(m_context.S[reg -
fpu_s0], RegisterValue::eTypeFloat);
233 reg_value.
SetUInt64(m_context.D[reg - fpu_d0], RegisterValue::eTypeDouble);
253 endian::InlHostByteOrder());
267bool RegisterContextWindows_arm::WriteRegister(
const RegisterInfo *reg_info,
273 if (!CacheAllRegisterValues())
398 m_context.D[reg - fpu_d0] = reg_value.
GetAsUInt64();
417 memcpy(&m_context.Q[reg - fpu_q0], reg_value.
GetBytes(), 16);
429 return ApplyAllRegisterValues();
static const uint32_t k_num_register_infos
void SetUInt64(uint64_t uint, Type t=eTypeUInt64)
uint64_t GetAsUInt64(uint64_t fail_value=UINT64_MAX, bool *success_ptr=nullptr) const
void SetBytes(const void *bytes, size_t length, lldb::ByteOrder byte_order)
const void * GetBytes() const
uint32_t GetAsUInt32(uint32_t fail_value=UINT32_MAX, bool *success_ptr=nullptr) const
void SetUInt32(uint32_t uint, Type t=eTypeUInt32)
A class that represents a running process on the host machine.
@ eRegisterKindLLDB
lldb's internal register numbers
Every register is described in detail including its name, alternate name (optional),...
uint32_t byte_size
Size in bytes of the register.
uint32_t kinds[lldb::kNumRegisterKinds]
Holds all of the various register numbers for all register kinds.
Registers are grouped into register sets.