1 //===-- SBWatchpoint.h ----------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SBWatchpoint_h_
10 #define LLDB_SBWatchpoint_h_
12 #include "lldb/API/SBDefines.h"
16 class LLDB_API SBWatchpoint {
20 SBWatchpoint(const lldb::SBWatchpoint &rhs);
22 SBWatchpoint(const lldb::WatchpointSP &wp_sp);
26 const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
28 explicit operator bool() const;
30 bool operator==(const SBWatchpoint &rhs) const;
32 bool operator!=(const SBWatchpoint &rhs) const;
40 /// With -1 representing an invalid hardware index.
41 int32_t GetHardwareIndex();
43 lldb::addr_t GetWatchAddress();
45 size_t GetWatchSize();
47 void SetEnabled(bool enabled);
51 uint32_t GetHitCount();
53 uint32_t GetIgnoreCount();
55 void SetIgnoreCount(uint32_t n);
57 const char *GetCondition();
59 void SetCondition(const char *condition);
61 bool GetDescription(lldb::SBStream &description, DescriptionLevel level);
65 lldb::WatchpointSP GetSP() const;
67 void SetSP(const lldb::WatchpointSP &sp);
69 static bool EventIsWatchpointEvent(const lldb::SBEvent &event);
71 static lldb::WatchpointEventType
72 GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event);
74 static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event);
77 friend class SBTarget;
80 std::weak_ptr<lldb_private::Watchpoint> m_opaque_wp;
85 #endif // LLDB_SBWatchpoint_h_