1 //===-- RegisterContextPOSIXProcessMonitor_mips64.h -------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_mips64_H_
10 #define liblldb_RegisterContextPOSIXProcessMonitor_mips64_H_
12 #include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
13 #include "Plugins/Process/Utility/lldb-mips-freebsd-register-enums.h"
14 #include "RegisterContextPOSIX.h"
16 class RegisterContextPOSIXProcessMonitor_mips64
17 : public RegisterContextPOSIX_mips64,
18 public POSIXBreakpointProtocol {
20 RegisterContextPOSIXProcessMonitor_mips64(
21 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
22 lldb_private::RegisterInfoInterface *register_info);
33 // lldb_private::RegisterContext
34 bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
36 bool WriteRegister(const unsigned reg,
37 const lldb_private::RegisterValue &value);
39 bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
40 lldb_private::RegisterValue &value);
42 bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
43 const lldb_private::RegisterValue &value);
45 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
47 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
49 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
52 bool ClearHardwareWatchpoint(uint32_t hw_index);
54 bool HardwareSingleStep(bool enable);
56 // POSIXBreakpointProtocol
57 bool UpdateAfterBreakpoint();
59 unsigned GetRegisterIndexFromOffset(unsigned offset);
61 bool IsWatchpointHit(uint32_t hw_index);
63 bool ClearWatchpointHits();
65 lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
67 bool IsWatchpointVacant(uint32_t hw_index);
69 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
70 bool write, uint32_t hw_index);
72 uint32_t NumSupportedHardwareWatchpoints();
76 m_gpr_mips64[k_num_gpr_registers_mips64]; // general purpose registers.
77 ProcessMonitor &GetMonitor();