File indexing completed on 2026-05-10 08:42:43
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef LLDB_API_SBWATCHPOINT_H
0010 #define LLDB_API_SBWATCHPOINT_H
0011
0012 #include "lldb/API/SBDefines.h"
0013 #include "lldb/API/SBType.h"
0014
0015 namespace lldb_private {
0016 namespace python {
0017 class SWIGBridge;
0018 }
0019 namespace lua {
0020 class SWIGBridge;
0021 }
0022 }
0023
0024 namespace lldb {
0025
0026 class LLDB_API SBWatchpoint {
0027 public:
0028 SBWatchpoint();
0029
0030 SBWatchpoint(const lldb::SBWatchpoint &rhs);
0031
0032 ~SBWatchpoint();
0033
0034 const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
0035
0036 explicit operator bool() const;
0037
0038 bool operator==(const SBWatchpoint &rhs) const;
0039
0040 bool operator!=(const SBWatchpoint &rhs) const;
0041
0042 bool IsValid() const;
0043
0044 SBError GetError();
0045
0046 watch_id_t GetID();
0047
0048 LLDB_DEPRECATED("Hardware index is not available, always returns -1")
0049 int32_t GetHardwareIndex();
0050
0051 lldb::addr_t GetWatchAddress();
0052
0053 size_t GetWatchSize();
0054
0055 void SetEnabled(bool enabled);
0056
0057 bool IsEnabled();
0058
0059 uint32_t GetHitCount();
0060
0061 uint32_t GetIgnoreCount();
0062
0063 void SetIgnoreCount(uint32_t n);
0064
0065 const char *GetCondition();
0066
0067 void SetCondition(const char *condition);
0068
0069 bool GetDescription(lldb::SBStream &description, DescriptionLevel level);
0070
0071 void Clear();
0072
0073 static bool EventIsWatchpointEvent(const lldb::SBEvent &event);
0074
0075 static lldb::WatchpointEventType
0076 GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event);
0077
0078 static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event);
0079
0080 lldb::SBType GetType();
0081
0082 WatchpointValueKind GetWatchValueKind();
0083
0084 const char *GetWatchSpec();
0085
0086 bool IsWatchingReads();
0087
0088 bool IsWatchingWrites();
0089
0090 protected:
0091 friend class lldb_private::python::SWIGBridge;
0092 friend class lldb_private::lua::SWIGBridge;
0093
0094 SBWatchpoint(const lldb::WatchpointSP &wp_sp);
0095
0096 lldb::WatchpointSP GetSP() const;
0097
0098 void SetSP(const lldb::WatchpointSP &sp);
0099
0100 private:
0101 friend class SBTarget;
0102 friend class SBValue;
0103
0104 std::weak_ptr<lldb_private::Watchpoint> m_opaque_wp;
0105 };
0106
0107 }
0108
0109 #endif