]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / source / Plugins / Process / FreeBSD / RegisterContextPOSIXProcessMonitor_arm.h
1 //===-- RegisterContextPOSIXProcessMonitor_arm.h --------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
10 #define liblldb_RegisterContextPOSIXProcessMonitor_arm_H_
11
12 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
13 #include "RegisterContextPOSIX.h"
14
15 class RegisterContextPOSIXProcessMonitor_arm : public RegisterContextPOSIX_arm,
16                                                public POSIXBreakpointProtocol {
17 public:
18   RegisterContextPOSIXProcessMonitor_arm(
19       lldb_private::Thread &thread, uint32_t concrete_frame_idx,
20       lldb_private::RegisterInfoInterface *register_info);
21
22 protected:
23   bool ReadGPR();
24
25   bool ReadFPR();
26
27   bool WriteGPR();
28
29   bool WriteFPR();
30
31   // lldb_private::RegisterContext
32   bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
33
34   bool WriteRegister(const unsigned reg,
35                      const lldb_private::RegisterValue &value);
36
37   bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
38                     lldb_private::RegisterValue &value);
39
40   bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
41                      const lldb_private::RegisterValue &value);
42
43   bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
44
45   bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
46
47   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
48                                  bool write);
49
50   bool ClearHardwareWatchpoint(uint32_t hw_index);
51
52   bool HardwareSingleStep(bool enable);
53
54   // POSIXBreakpointProtocol
55   bool UpdateAfterBreakpoint();
56
57   unsigned GetRegisterIndexFromOffset(unsigned offset);
58
59   bool IsWatchpointHit(uint32_t hw_index);
60
61   bool ClearWatchpointHits();
62
63   lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
64
65   bool IsWatchpointVacant(uint32_t hw_index);
66
67   bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
68                                       bool write, uint32_t hw_index);
69
70   uint32_t NumSupportedHardwareWatchpoints();
71
72 private:
73   ProcessMonitor &GetMonitor();
74 };
75
76 #endif