LLDB  mainline
RegisterContextPOSIXProcessMonitor_x86.h
Go to the documentation of this file.
1 //===-- RegisterContextPOSIXProcessMonitor_x86.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_x86_H_
10 #define liblldb_RegisterContextPOSIXProcessMonitor_x86_H_
11 
13 #include "RegisterContextPOSIX.h"
14 #include <sys/uio.h>
15 
17  : public RegisterContextPOSIX_x86,
19 public:
21  lldb_private::Thread &thread, uint32_t concrete_frame_idx,
23 
24 protected:
25  bool ReadGPR() override;
26 
27  bool ReadFPR() override;
28 
29  bool WriteGPR() override;
30 
31  bool WriteFPR() override;
32 
33  // lldb_private::RegisterContext
34  bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
35 
36  bool WriteRegister(const unsigned reg,
37  const lldb_private::RegisterValue &value);
38 
39  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
40  lldb_private::RegisterValue &value) override;
41 
42  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
43  const lldb_private::RegisterValue &value) override;
44 
45  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
46 
47  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
48 
49  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
50  bool write) override;
51 
52  bool ClearHardwareWatchpoint(uint32_t hw_index) override;
53 
54  bool HardwareSingleStep(bool enable) override;
55 
56  // POSIXBreakpointProtocol
57  bool UpdateAfterBreakpoint() override;
58 
59  unsigned GetRegisterIndexFromOffset(unsigned offset) override;
60 
61  bool IsWatchpointHit(uint32_t hw_index) override;
62 
63  bool ClearWatchpointHits() override;
64 
65  lldb::addr_t GetWatchpointAddress(uint32_t hw_index) override;
66 
67  bool IsWatchpointVacant(uint32_t hw_index) override;
68 
69  bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
70  bool write, uint32_t hw_index) override;
71 
73 
74 private:
76  uint32_t
77  m_fctrl_offset_in_userarea; // Offset of 'fctrl' in 'UserArea' Structure
78  struct iovec m_iovec;
79 };
80 
81 #endif
Extends RegisterClass with a few virtual operations useful on POSIX.
RegisterInfo interface to patch RegisterInfo structure for archs.
lldb::addr_t GetWatchpointAddress(uint32_t hw_index) override
bool UpdateAfterBreakpoint() override
Updates the register state of the associated thread after hitting a breakpoint (if that make sense fo...
bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value)
Manages communication with the inferior (debugee) process.
uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, bool write) override
bool WriteRegister(const unsigned reg, const lldb_private::RegisterValue &value)
bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read, bool write, uint32_t hw_index) override
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
uint64_t addr_t
Definition: lldb-types.h:83
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override
RegisterContextPOSIXProcessMonitor_x86_64(lldb_private::Thread &thread, uint32_t concrete_frame_idx, lldb_private::RegisterInfoInterface *register_info)
unsigned GetRegisterIndexFromOffset(unsigned offset) override
Determines the index in lldb&#39;s register file given a kernel byte offset.