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
29#define EXC_OFFSET(reg) 0
30#define DBG_OFFSET_NAME(reg) 0
32#define DEFINE_DBG(reg, i) \
34 0, DBG_OFFSET_NAME(reg[i]), eEncodingUint, eFormatHex, \
35 {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
36 LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, \
37 LLDB_INVALID_REGNUM }, \
41#define DECLARE_REGISTER_INFOS_ARM_STRUCT
43#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
49uint32_t g_gpr_reg_indices[] = {
54uint32_t g_fpu_reg_indices[] = {
60 fpu_d0, fpu_d1, fpu_d2, fpu_d3, fpu_d4, fpu_d5, fpu_d6, fpu_d7,
61 fpu_d8, fpu_d9, fpu_d10, fpu_d11, fpu_d12, fpu_d13, fpu_d14, fpu_d15,
62 fpu_d16, fpu_d17, fpu_d18, fpu_d19, fpu_d20, fpu_d21, fpu_d22, fpu_d23,
63 fpu_d24, fpu_d25, fpu_d26, fpu_d27, fpu_d28, fpu_d29, fpu_d30, fpu_d31,
65 fpu_q0, fpu_q1, fpu_q2, fpu_q3, fpu_q4, fpu_q5, fpu_q6, fpu_q7,
66 fpu_q8, fpu_q9, fpu_q10, fpu_q11, fpu_q12, fpu_q13, fpu_q14, fpu_q15,
72 {
"General Purpose Registers",
"gpr", std::size(g_gpr_reg_indices),
74 {
"Floating Point Registers",
"fpu", std::size(g_fpu_reg_indices),
79RegisterContextWindows_arm::RegisterContextWindows_arm(
80 Thread &thread, uint32_t concrete_frame_idx)
83RegisterContextWindows_arm::~RegisterContextWindows_arm() {}
85size_t RegisterContextWindows_arm::GetRegisterCount() {
86 return std::size(g_register_infos_arm);
90RegisterContextWindows_arm::GetRegisterInfoAtIndex(
size_t reg) {
92 return &g_register_infos_arm[reg];
96size_t RegisterContextWindows_arm::GetRegisterSetCount() {
97 return std::size(g_register_sets);
100const RegisterSet *RegisterContextWindows_arm::GetRegisterSet(
size_t reg_set) {
101 return &g_register_sets[reg_set];
104bool RegisterContextWindows_arm::ReadRegister(
const RegisterInfo *reg_info,
106 if (!CacheAllRegisterValues())
109 if (reg_info ==
nullptr)
268bool RegisterContextWindows_arm::WriteRegister(
const RegisterInfo *reg_info,
274 if (!CacheAllRegisterValues())
399 m_context.D[reg - fpu_d0] = reg_value.
GetAsUInt64();
418 memcpy(&m_context.Q[reg - fpu_q0], reg_value.
GetBytes(), 16);
430 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)
@ eTypeFloat
< This value is used when the (integer) register is larger than 64-bits.
lldb::ByteOrder InlHostByteOrder()
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.