1 //===-- SBWatchpoint.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 LLDB_SBWatchpoint_h_ 11 #define LLDB_SBWatchpoint_h_ 12 13 #include "lldb/API/SBDefines.h" 14 15 namespace lldb { 16 17 class LLDB_API SBWatchpoint { 18 public: 19 SBWatchpoint(); 20 21 SBWatchpoint(const lldb::SBWatchpoint &rhs); 22 23 SBWatchpoint(const lldb::WatchpointSP &wp_sp); 24 25 ~SBWatchpoint(); 26 27 const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs); 28 29 bool IsValid() const; 30 31 SBError GetError(); 32 33 watch_id_t GetID(); 34 35 /// With -1 representing an invalid hardware index. 36 int32_t GetHardwareIndex(); 37 38 lldb::addr_t GetWatchAddress(); 39 40 size_t GetWatchSize(); 41 42 void SetEnabled(bool enabled); 43 44 bool IsEnabled(); 45 46 uint32_t GetHitCount(); 47 48 uint32_t GetIgnoreCount(); 49 50 void SetIgnoreCount(uint32_t n); 51 52 const char *GetCondition(); 53 54 void SetCondition(const char *condition); 55 56 bool GetDescription(lldb::SBStream &description, DescriptionLevel level); 57 58 void Clear(); 59 60 lldb::WatchpointSP GetSP() const; 61 62 void SetSP(const lldb::WatchpointSP &sp); 63 64 static bool EventIsWatchpointEvent(const lldb::SBEvent &event); 65 66 static lldb::WatchpointEventType 67 GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event); 68 69 static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event); 70 71 private: 72 friend class SBTarget; 73 friend class SBValue; 74 75 std::weak_ptr<lldb_private::Watchpoint> m_opaque_wp; 76 }; 77 78 } // namespace lldb 79 80 #endif // LLDB_SBWatchpoint_h_ 81