1 //===-- RegisterContextPOSIXProcessMonitor_arm.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 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
11 #define liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
13 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
14 #include "RegisterContextPOSIX.h"
16 class RegisterContextPOSIXProcessMonitor_arm : public RegisterContextPOSIX_arm,
17 public POSIXBreakpointProtocol {
19 RegisterContextPOSIXProcessMonitor_arm(
20 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
21 lldb_private::RegisterInfoInterface *register_info);
32 // lldb_private::RegisterContext
33 bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
35 bool WriteRegister(const unsigned reg,
36 const lldb_private::RegisterValue &value);
38 bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
39 lldb_private::RegisterValue &value);
41 bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
42 const lldb_private::RegisterValue &value);
44 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
46 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
48 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
51 bool ClearHardwareWatchpoint(uint32_t hw_index);
53 bool HardwareSingleStep(bool enable);
55 // POSIXBreakpointProtocol
56 bool UpdateAfterBreakpoint();
58 unsigned GetRegisterIndexFromOffset(unsigned offset);
60 bool IsWatchpointHit(uint32_t hw_index);
62 bool ClearWatchpointHits();
64 lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
66 bool IsWatchpointVacant(uint32_t hw_index);
68 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
69 bool write, uint32_t hw_index);
71 uint32_t NumSupportedHardwareWatchpoints();
74 ProcessMonitor &GetMonitor();