LLDB  mainline
RegisterContextPOSIXProcessMonitor_arm64.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIXProcessMonitor_arm64.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_arm64_H_
10 #define liblldb_RegisterContextPOSIXProcessMonitor_arm64_H_
11 
13 #include "RegisterContextPOSIX.h"
14 
18 public:
20  lldb_private::Thread &thread,
21  std::unique_ptr<RegisterInfoPOSIX_arm64> register_info);
22 
23 protected:
24  bool ReadGPR() override;
25 
26  bool ReadFPR() override;
27 
28  bool WriteGPR() override;
29 
30  bool WriteFPR() override;
31 
32  // lldb_private::RegisterContext
33  bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
34 
35  bool WriteRegister(const unsigned reg,
36  const lldb_private::RegisterValue &value);
37 
38  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
39  lldb_private::RegisterValue &value) override;
40 
41  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
42  const lldb_private::RegisterValue &value) override;
43 
44  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
45 
46  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
47 
48  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
49  bool write) override;
50 
51  bool ClearHardwareWatchpoint(uint32_t hw_index) override;
52 
53  bool HardwareSingleStep(bool enable) override;
54 
55  // POSIXBreakpointProtocol
56  bool UpdateAfterBreakpoint() override;
57 
58  unsigned GetRegisterIndexFromOffset(unsigned offset) override;
59 
60  bool IsWatchpointHit(uint32_t hw_index) override;
61 
62  bool ClearWatchpointHits() override;
63 
64  lldb::addr_t GetWatchpointAddress(uint32_t hw_index) override;
65 
66  bool IsWatchpointVacant(uint32_t hw_index) override;
67 
68  bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
69  bool write, uint32_t hw_index) override;
70 
72 
73 private:
74  RegisterInfoPOSIX_arm64::GPR m_gpr_arm64; // 64-bit general purpose registers.
75 
77  m_fpr; // floating-point registers including extended register sets.
78 
80 };
81 
82 #endif
Extends RegisterClass with a few virtual operations useful on POSIX.
Manages communication with the inferior (debugee) process.
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
RegisterContextPOSIXProcessMonitor_arm64(lldb_private::Thread &thread, std::unique_ptr< RegisterInfoPOSIX_arm64 > register_info)
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 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 ReadRegister(const unsigned reg, lldb_private::RegisterValue &value)
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.
uint64_t addr_t
Definition: lldb-types.h:83