LLDB  mainline
RegisterContextPOSIXProcessMonitor_arm.h
Go to the documentation of this file.
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 
13 #include "RegisterContextPOSIX.h"
14 
17 public:
19  lldb_private::Thread &thread,
20  std::unique_ptr<RegisterInfoPOSIX_arm> register_info);
21 
22 protected:
23  bool ReadGPR() override;
24 
25  bool ReadFPR() override;
26 
27  bool WriteGPR() override;
28 
29  bool WriteFPR() override;
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) override;
39 
40  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
41  const lldb_private::RegisterValue &value) override;
42 
43  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
44 
45  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
46 
47  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
48  bool write) override;
49 
50  bool ClearHardwareWatchpoint(uint32_t hw_index) override;
51 
52  bool HardwareSingleStep(bool enable) override;
53 
54  // POSIXBreakpointProtocol
55  bool UpdateAfterBreakpoint() override;
56 
57  unsigned GetRegisterIndexFromOffset(unsigned offset) override;
58 
59  bool IsWatchpointHit(uint32_t hw_index) override;
60 
61  bool ClearWatchpointHits() override;
62 
63  lldb::addr_t GetWatchpointAddress(uint32_t hw_index) override;
64 
65  bool IsWatchpointVacant(uint32_t hw_index) override;
66 
67  bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
68  bool write, uint32_t hw_index) override;
69 
71 
72 private:
74 
76 
78 };
79 
80 #endif
Extends RegisterClass with a few virtual operations useful on POSIX.
Manages communication with the inferior (debugee) process.
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override
bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read, bool write, uint32_t hw_index) override
bool WriteRegister(const unsigned reg, const lldb_private::RegisterValue &value)
bool UpdateAfterBreakpoint() override
Updates the register state of the associated thread after hitting a breakpoint (if that make sense fo...
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value)
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
RegisterContextPOSIXProcessMonitor_arm(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm > register_info)
uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, bool write) override
unsigned GetRegisterIndexFromOffset(unsigned offset) override
Determines the index in lldb's register file given a kernel byte offset.
lldb::addr_t GetWatchpointAddress(uint32_t hw_index) override
uint64_t addr_t
Definition: lldb-types.h:83