1 //===-- RegisterContextPOSIXProcessMonitor_powerpc.h -------------*- C++
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_powerpc_H_
11 #define liblldb_RegisterContextPOSIXProcessMonitor_powerpc_H_
13 #include "Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h"
14 #include "RegisterContextPOSIX.h"
16 class RegisterContextPOSIXProcessMonitor_powerpc
17 : public RegisterContextPOSIX_powerpc,
18 public POSIXBreakpointProtocol {
20 RegisterContextPOSIXProcessMonitor_powerpc(
21 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
22 lldb_private::RegisterInfoInterface *register_info);
39 // lldb_private::RegisterContext
40 bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
42 bool WriteRegister(const unsigned reg,
43 const lldb_private::RegisterValue &value);
45 bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
46 lldb_private::RegisterValue &value);
48 bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
49 const lldb_private::RegisterValue &value);
51 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
53 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
55 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
58 bool ClearHardwareWatchpoint(uint32_t hw_index);
60 bool HardwareSingleStep(bool enable);
62 // POSIXBreakpointProtocol
63 bool UpdateAfterBreakpoint();
65 unsigned GetRegisterIndexFromOffset(unsigned offset);
67 bool IsWatchpointHit(uint32_t hw_index);
69 bool ClearWatchpointHits();
71 lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
73 bool IsWatchpointVacant(uint32_t hw_index);
75 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
76 bool write, uint32_t hw_index);
78 uint32_t NumSupportedHardwareWatchpoints();
81 ProcessMonitor &GetMonitor();