1 //===-- RegisterContextPOSIXProcessMonitor_arm.h --------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_RegisterContextPOSIXProcessMonitor_arm_H_ 11 #define liblldb_RegisterContextPOSIXProcessMonitor_arm_H_ 12 13 #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h" 14 #include "RegisterContextPOSIX.h" 15 16 class RegisterContextPOSIXProcessMonitor_arm : public RegisterContextPOSIX_arm, 17 public POSIXBreakpointProtocol { 18 public: 19 RegisterContextPOSIXProcessMonitor_arm( 20 lldb_private::Thread &thread, uint32_t concrete_frame_idx, 21 lldb_private::RegisterInfoInterface *register_info); 22 23 protected: 24 bool ReadGPR(); 25 26 bool ReadFPR(); 27 28 bool WriteGPR(); 29 30 bool WriteFPR(); 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); 40 41 bool WriteRegister(const lldb_private::RegisterInfo *reg_info, 42 const lldb_private::RegisterValue &value); 43 44 bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp); 45 46 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); 47 48 uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, 49 bool write); 50 51 bool ClearHardwareWatchpoint(uint32_t hw_index); 52 53 bool HardwareSingleStep(bool enable); 54 55 // POSIXBreakpointProtocol 56 bool UpdateAfterBreakpoint(); 57 58 unsigned GetRegisterIndexFromOffset(unsigned offset); 59 60 bool IsWatchpointHit(uint32_t hw_index); 61 62 bool ClearWatchpointHits(); 63 64 lldb::addr_t GetWatchpointAddress(uint32_t hw_index); 65 66 bool IsWatchpointVacant(uint32_t hw_index); 67 68 bool SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read, 69 bool write, uint32_t hw_index); 70 71 uint32_t NumSupportedHardwareWatchpoints(); 72 73 private: 74 ProcessMonitor &GetMonitor(); 75 }; 76 77 #endif 78