1 //===-- NativeRegisterContextLinux_mips64.h ---------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #if defined (__mips__)
12 #ifndef lldb_NativeRegisterContextLinux_mips64_h
13 #define lldb_NativeRegisterContextLinux_mips64_h
15 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
16 #include "Plugins/Process/Utility/RegisterContext_mips.h"
17 #include "Plugins/Process/Utility/lldb-mips-linux-register-enums.h"
21 namespace lldb_private {
22 namespace process_linux {
24 class NativeProcessLinux;
26 class NativeRegisterContextLinux_mips64 : public NativeRegisterContextLinux
29 NativeRegisterContextLinux_mips64 (const ArchSpec& target_arch,
30 NativeThreadProtocol &native_thread,
31 uint32_t concrete_frame_idx);
34 GetRegisterSetCount () const override;
37 GetPCfromBreakpointLocation (lldb::addr_t fail_value = LLDB_INVALID_ADDRESS) override;
40 GetWatchpointHitAddress (uint32_t wp_index) override;
43 GetRegisterSet (uint32_t set_index) const override;
46 ReadRegister (const RegisterInfo *reg_info, RegisterValue ®_value) override;
49 WriteRegister (const RegisterInfo *reg_info, const RegisterValue ®_value) override;
52 ReadAllRegisterValues (lldb::DataBufferSP &data_sp) override;
55 WriteAllRegisterValues (const lldb::DataBufferSP &data_sp) override;
64 IsWatchpointHit (uint32_t wp_index, bool &is_hit) override;
66 uint8_t *ReturnFPOffset(uint8_t reg_index, uint32_t byte_offset);
70 GetWatchpointHitIndex(uint32_t &wp_index, lldb::addr_t trap_addr) override;
73 IsWatchpointVacant (uint32_t wp_index, bool &is_vacant) override;
76 ClearHardwareWatchpoint (uint32_t wp_index) override;
79 ClearAllHardwareWatchpoints () override;
82 SetHardwareWatchpointWithIndex (lldb::addr_t addr, size_t size,
83 uint32_t watch_flags, uint32_t wp_index);
86 SetHardwareWatchpoint (lldb::addr_t addr, size_t size,
87 uint32_t watch_flags) override;
90 GetWatchpointAddress (uint32_t wp_index) override;
93 NumSupportedHardwareWatchpoints () override;
101 Read_SR_Config(uint32_t offset, const char *reg_name, uint32_t size,
102 RegisterValue &value);
105 ReadRegisterRaw(uint32_t reg_index, RegisterValue &value) override;
108 DoReadWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback);
111 WriteRegisterRaw(uint32_t reg_index,
112 const RegisterValue &value) override;
115 DoWriteWatchPointRegisterValue(lldb::tid_t tid, void* watch_readback);
124 IsFPR(uint32_t reg_index) const;
127 IsMSA(uint32_t reg_index) const;
130 GetGPRBuffer() override { return &m_gpr; }
133 GetFPRBuffer() override { return &m_fpr; }
136 GetFPRSize() override { return sizeof(FPR_linux_mips); }
139 // Info about register ranges.
142 uint32_t num_registers;
143 uint32_t num_gpr_registers;
144 uint32_t num_fpr_registers;
155 GPR_linux_mips m_gpr;
157 FPR_linux_mips m_fpr;
159 MSA_linux_mips m_msa;
161 lldb::addr_t hw_addr_map[MAX_NUM_WP];
166 } // namespace process_linux
167 } // namespace lldb_private
169 #endif // #ifndef lldb_NativeRegisterContextLinux_mips64_h
171 #endif // defined (__mips__)