9#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
11#ifndef lldb_NativeRegisterContextLinux_arm_h
12#define lldb_NativeRegisterContextLinux_arm_h
19namespace process_linux {
21class NativeProcessLinux;
23class NativeRegisterContextLinux_arm :
public NativeRegisterContextLinux {
25 NativeRegisterContextLinux_arm(
const ArchSpec &target_arch,
26 NativeThreadProtocol &native_thread);
28 uint32_t GetRegisterSetCount()
const override;
30 const RegisterSet *GetRegisterSet(uint32_t set_index)
const override;
32 uint32_t GetUserRegisterCount()
const override;
34 Status ReadRegister(
const RegisterInfo *reg_info,
35 RegisterValue ®_value)
override;
37 Status WriteRegister(
const RegisterInfo *reg_info,
38 const RegisterValue ®_value)
override;
46 uint32_t NumSupportedHardwareBreakpoints()
override;
48 uint32_t SetHardwareBreakpoint(
lldb::addr_t addr,
size_t size)
override;
50 bool ClearHardwareBreakpoint(uint32_t hw_idx)
override;
52 Status ClearAllHardwareBreakpoints()
override;
54 Status GetHardwareBreakHitIndex(uint32_t &bp_index,
57 uint32_t NumSupportedHardwareWatchpoints()
override;
59 uint32_t SetHardwareWatchpoint(
lldb::addr_t addr,
size_t size,
60 uint32_t watch_flags)
override;
62 bool ClearHardwareWatchpoint(uint32_t hw_index)
override;
64 Status ClearAllHardwareWatchpoints()
override;
66 Status GetWatchpointHitIndex(uint32_t &wp_index,
69 lldb::addr_t GetWatchpointHitAddress(uint32_t wp_index)
override;
71 lldb::addr_t GetWatchpointAddress(uint32_t wp_index)
override;
73 uint32_t GetWatchpointSize(uint32_t wp_index);
75 bool WatchpointIsEnabled(uint32_t wp_index);
78 enum DREGType { eDREGTypeWATCH = 0, eDREGTypeBREAK };
81 Status DoReadRegisterValue(uint32_t offset,
const char *reg_name,
82 uint32_t size, RegisterValue &value)
override;
84 Status DoWriteRegisterValue(uint32_t offset,
const char *reg_name,
85 const RegisterValue &value)
override;
89 Status WriteGPR()
override;
93 Status WriteFPR()
override;
95 void *GetGPRBuffer()
override {
return &m_gpr_arm; }
97 void *GetFPRBuffer()
override {
return &m_fpr; }
99 size_t GetFPRSize()
override {
return sizeof(m_fpr); }
115 struct DREG m_hbr_regs[16];
116 struct DREG m_hwp_regs[16];
118 uint32_t m_max_hwp_supported;
119 uint32_t m_max_hbp_supported;
120 bool m_refresh_hwdebug_info;
122 bool IsGPR(
unsigned reg)
const;
124 bool IsFPR(
unsigned reg)
const;
126 Status ReadHardwareDebugInfo();
128 Status WriteHardwareDebugRegs(
int hwbType,
int hwb_index);
130 uint32_t CalculateFprOffset(
const RegisterInfo *reg_info)
const;
A class that represents a running process on the host machine.
@ k_num_gpr_registers_arm
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP