1 //===-- RegisterContextPOSIXProcessMonitor_x86.h ----------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_x86_H_
11 #define liblldb_RegisterContextPOSIXProcessMonitor_x86_H_
13 #include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h"
14 #include "RegisterContextPOSIX.h"
17 class RegisterContextPOSIXProcessMonitor_x86_64
18 : public RegisterContextPOSIX_x86,
19 public POSIXBreakpointProtocol {
21 RegisterContextPOSIXProcessMonitor_x86_64(
22 lldb_private::Thread &thread, uint32_t concrete_frame_idx,
23 lldb_private::RegisterInfoInterface *register_info);
34 // lldb_private::RegisterContext
35 bool ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
37 bool WriteRegister(const unsigned reg,
38 const lldb_private::RegisterValue &value);
40 bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
41 lldb_private::RegisterValue &value);
43 bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
44 const lldb_private::RegisterValue &value);
46 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
48 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
50 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
53 bool ClearHardwareWatchpoint(uint32_t hw_index);
55 bool HardwareSingleStep(bool enable);
57 // POSIXBreakpointProtocol
58 bool UpdateAfterBreakpoint();
60 unsigned GetRegisterIndexFromOffset(unsigned offset);
62 bool IsWatchpointHit(uint32_t hw_index);
64 bool ClearWatchpointHits();
66 lldb::addr_t GetWatchpointAddress(uint32_t hw_index);
68 bool IsWatchpointVacant(uint32_t hw_index);
70 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read,
71 bool write, uint32_t hw_index);
73 uint32_t NumSupportedHardwareWatchpoints();
76 ProcessMonitor &GetMonitor();
78 m_fctrl_offset_in_userarea; // Offset of 'fctrl' in 'UserArea' Structure