1 //===-- RegisterContextPOSIXProcessMonitor_arm.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_arm_H_
10 #define liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
12 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
13 #include "RegisterContextPOSIX.h"
15 class RegisterContextPOSIXProcessMonitor_arm : public RegisterContextPOSIX_arm,
16 public POSIXBreakpointProtocol {
18 RegisterContextPOSIXProcessMonitor_arm(
19 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
20 lldb_private::RegisterInfoInterface *register_info);
31 // lldb_private::RegisterContext
32 bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
34 bool WriteRegister(const unsigned reg,
35 const lldb_private::RegisterValue &value);
37 bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
38 lldb_private::RegisterValue &value);
40 bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
41 const lldb_private::RegisterValue &value);
43 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
45 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
47 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
50 bool ClearHardwareWatchpoint(uint32_t hw_index);
52 bool HardwareSingleStep(bool enable);
54 // POSIXBreakpointProtocol
55 bool UpdateAfterBreakpoint();
57 unsigned GetRegisterIndexFromOffset(unsigned offset);
59 bool IsWatchpointHit(uint32_t hw_index);
61 bool ClearWatchpointHits();
63 lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
65 bool IsWatchpointVacant(uint32_t hw_index);
67 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
68 bool write, uint32_t hw_index);
70 uint32_t NumSupportedHardwareWatchpoints();
73 ProcessMonitor &GetMonitor();