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