11b282f96SGreg Clayton //===-- SBWatchpoint.cpp --------------------------------*- C++ -*-===//
21b282f96SGreg Clayton //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
61b282f96SGreg Clayton //
71b282f96SGreg Clayton //===----------------------------------------------------------------------===//
81b282f96SGreg Clayton 
91b282f96SGreg Clayton #include "lldb/API/SBWatchpoint.h"
10baf5664fSJonas Devlieghere #include "SBReproducerPrivate.h"
111b282f96SGreg Clayton #include "lldb/API/SBAddress.h"
121b282f96SGreg Clayton #include "lldb/API/SBDebugger.h"
13b9c1b51eSKate Stone #include "lldb/API/SBDefines.h"
141b5792e5SJim Ingham #include "lldb/API/SBEvent.h"
151b282f96SGreg Clayton #include "lldb/API/SBStream.h"
161b282f96SGreg Clayton 
1701a67860SJohnny Chen #include "lldb/Breakpoint/Watchpoint.h"
1801a67860SJohnny Chen #include "lldb/Breakpoint/WatchpointList.h"
191b282f96SGreg Clayton #include "lldb/Core/StreamFile.h"
20306b62b4SJim Ingham #include "lldb/Target/Process.h"
211b282f96SGreg Clayton #include "lldb/Target/Target.h"
22bf9a7730SZachary Turner #include "lldb/Utility/Stream.h"
23b9c1b51eSKate Stone #include "lldb/lldb-defines.h"
24b9c1b51eSKate Stone #include "lldb/lldb-types.h"
251b282f96SGreg Clayton 
261b282f96SGreg Clayton using namespace lldb;
271b282f96SGreg Clayton using namespace lldb_private;
281b282f96SGreg Clayton 
29baf5664fSJonas Devlieghere SBWatchpoint::SBWatchpoint() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBWatchpoint); }
301b282f96SGreg Clayton 
31b9c1b51eSKate Stone SBWatchpoint::SBWatchpoint(const lldb::WatchpointSP &wp_sp)
327a1d34beSPavel Labath     : m_opaque_wp(wp_sp) {
33baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &), wp_sp);
341b282f96SGreg Clayton }
351b282f96SGreg Clayton 
36b9c1b51eSKate Stone SBWatchpoint::SBWatchpoint(const SBWatchpoint &rhs)
37baf5664fSJonas Devlieghere     : m_opaque_wp(rhs.m_opaque_wp) {
38baf5664fSJonas Devlieghere   LLDB_RECORD_CONSTRUCTOR(SBWatchpoint, (const lldb::SBWatchpoint &), rhs);
39baf5664fSJonas Devlieghere }
401b282f96SGreg Clayton 
41b9c1b51eSKate Stone const SBWatchpoint &SBWatchpoint::operator=(const SBWatchpoint &rhs) {
42baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(const lldb::SBWatchpoint &,
43baf5664fSJonas Devlieghere                      SBWatchpoint, operator=,(const lldb::SBWatchpoint &), rhs);
44baf5664fSJonas Devlieghere 
457a1d34beSPavel Labath   m_opaque_wp = rhs.m_opaque_wp;
461b282f96SGreg Clayton   return *this;
471b282f96SGreg Clayton }
481b282f96SGreg Clayton 
49b9c1b51eSKate Stone SBWatchpoint::~SBWatchpoint() {}
501b282f96SGreg Clayton 
51b9c1b51eSKate Stone watch_id_t SBWatchpoint::GetID() {
52baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::watch_id_t, SBWatchpoint, GetID);
53baf5664fSJonas Devlieghere 
541b282f96SGreg Clayton 
551b282f96SGreg Clayton   watch_id_t watch_id = LLDB_INVALID_WATCH_ID;
5681e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
5781e871edSGreg Clayton   if (watchpoint_sp)
5881e871edSGreg Clayton     watch_id = watchpoint_sp->GetID();
591b282f96SGreg Clayton 
601b282f96SGreg Clayton   return watch_id;
611b282f96SGreg Clayton }
621b282f96SGreg Clayton 
63baf5664fSJonas Devlieghere bool SBWatchpoint::IsValid() const {
64baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBWatchpoint, IsValid);
657f5237bcSPavel Labath   return this->operator bool();
667f5237bcSPavel Labath }
677f5237bcSPavel Labath SBWatchpoint::operator bool() const {
687f5237bcSPavel Labath   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBWatchpoint, operator bool);
69baf5664fSJonas Devlieghere 
70baf5664fSJonas Devlieghere   return bool(m_opaque_wp.lock());
71baf5664fSJonas Devlieghere }
721b282f96SGreg Clayton 
73b9c1b51eSKate Stone SBError SBWatchpoint::GetError() {
74baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBWatchpoint, GetError);
75baf5664fSJonas Devlieghere 
76ef42a6fbSJim Ingham   SBError sb_error;
77ef42a6fbSJim Ingham   lldb::WatchpointSP watchpoint_sp(GetSP());
78b9c1b51eSKate Stone   if (watchpoint_sp) {
79ef42a6fbSJim Ingham     sb_error.SetError(watchpoint_sp->GetError());
80ef42a6fbSJim Ingham   }
81baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(sb_error);
82ef42a6fbSJim Ingham }
83ef42a6fbSJim Ingham 
84b9c1b51eSKate Stone int32_t SBWatchpoint::GetHardwareIndex() {
85baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(int32_t, SBWatchpoint, GetHardwareIndex);
86baf5664fSJonas Devlieghere 
871b282f96SGreg Clayton   int32_t hw_index = -1;
881b282f96SGreg Clayton 
8981e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
90b9c1b51eSKate Stone   if (watchpoint_sp) {
91b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
92b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
9381e871edSGreg Clayton     hw_index = watchpoint_sp->GetHardwareIndex();
941b282f96SGreg Clayton   }
951b282f96SGreg Clayton 
961b282f96SGreg Clayton   return hw_index;
971b282f96SGreg Clayton }
981b282f96SGreg Clayton 
99b9c1b51eSKate Stone addr_t SBWatchpoint::GetWatchAddress() {
100baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(lldb::addr_t, SBWatchpoint, GetWatchAddress);
101baf5664fSJonas Devlieghere 
1021b282f96SGreg Clayton   addr_t ret_addr = LLDB_INVALID_ADDRESS;
1031b282f96SGreg Clayton 
10481e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
105b9c1b51eSKate Stone   if (watchpoint_sp) {
106b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
107b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
10881e871edSGreg Clayton     ret_addr = watchpoint_sp->GetLoadAddress();
1091b282f96SGreg Clayton   }
1101b282f96SGreg Clayton 
1111b282f96SGreg Clayton   return ret_addr;
1121b282f96SGreg Clayton }
1131b282f96SGreg Clayton 
114b9c1b51eSKate Stone size_t SBWatchpoint::GetWatchSize() {
115baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBWatchpoint, GetWatchSize);
116baf5664fSJonas Devlieghere 
1171b282f96SGreg Clayton   size_t watch_size = 0;
1181b282f96SGreg Clayton 
11981e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
120b9c1b51eSKate Stone   if (watchpoint_sp) {
121b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
122b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
12381e871edSGreg Clayton     watch_size = watchpoint_sp->GetByteSize();
1241b282f96SGreg Clayton   }
1251b282f96SGreg Clayton 
1261b282f96SGreg Clayton   return watch_size;
1271b282f96SGreg Clayton }
1281b282f96SGreg Clayton 
129b9c1b51eSKate Stone void SBWatchpoint::SetEnabled(bool enabled) {
130baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(void, SBWatchpoint, SetEnabled, (bool), enabled);
131baf5664fSJonas Devlieghere 
13281e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
133b9c1b51eSKate Stone   if (watchpoint_sp) {
134306b62b4SJim Ingham     Target &target = watchpoint_sp->GetTarget();
135306b62b4SJim Ingham     std::lock_guard<std::recursive_mutex> guard(target.GetAPIMutex());
136306b62b4SJim Ingham     ProcessSP process_sp = target.GetProcessSP();
137c76c3f2fSJim Ingham     const bool notify = true;
138306b62b4SJim Ingham     if (process_sp) {
139306b62b4SJim Ingham       if (enabled)
140c76c3f2fSJim Ingham         process_sp->EnableWatchpoint(watchpoint_sp.get(), notify);
141306b62b4SJim Ingham       else
142c76c3f2fSJim Ingham         process_sp->DisableWatchpoint(watchpoint_sp.get(), notify);
143306b62b4SJim Ingham     } else {
144c76c3f2fSJim Ingham       watchpoint_sp->SetEnabled(enabled, notify);
1451b282f96SGreg Clayton     }
1461b282f96SGreg Clayton   }
147306b62b4SJim Ingham }
1481b282f96SGreg Clayton 
149b9c1b51eSKate Stone bool SBWatchpoint::IsEnabled() {
150baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(bool, SBWatchpoint, IsEnabled);
151baf5664fSJonas Devlieghere 
15281e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
153b9c1b51eSKate Stone   if (watchpoint_sp) {
154b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
155b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
15681e871edSGreg Clayton     return watchpoint_sp->IsEnabled();
157b9c1b51eSKate Stone   } else
1581b282f96SGreg Clayton     return false;
1591b282f96SGreg Clayton }
1601b282f96SGreg Clayton 
161b9c1b51eSKate Stone uint32_t SBWatchpoint::GetHitCount() {
162baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBWatchpoint, GetHitCount);
163baf5664fSJonas Devlieghere 
1641b282f96SGreg Clayton   uint32_t count = 0;
16581e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
166b9c1b51eSKate Stone   if (watchpoint_sp) {
167b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
168b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
16981e871edSGreg Clayton     count = watchpoint_sp->GetHitCount();
1701b282f96SGreg Clayton   }
1711b282f96SGreg Clayton 
1721b282f96SGreg Clayton   return count;
1731b282f96SGreg Clayton }
1741b282f96SGreg Clayton 
175b9c1b51eSKate Stone uint32_t SBWatchpoint::GetIgnoreCount() {
176baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBWatchpoint, GetIgnoreCount);
177baf5664fSJonas Devlieghere 
17881e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
179b9c1b51eSKate Stone   if (watchpoint_sp) {
180b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
181b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
18281e871edSGreg Clayton     return watchpoint_sp->GetIgnoreCount();
183b9c1b51eSKate Stone   } else
1841b282f96SGreg Clayton     return 0;
1851b282f96SGreg Clayton }
1861b282f96SGreg Clayton 
187b9c1b51eSKate Stone void SBWatchpoint::SetIgnoreCount(uint32_t n) {
188baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(void, SBWatchpoint, SetIgnoreCount, (uint32_t), n);
189baf5664fSJonas Devlieghere 
19081e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
191b9c1b51eSKate Stone   if (watchpoint_sp) {
192b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
193b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
19481e871edSGreg Clayton     watchpoint_sp->SetIgnoreCount(n);
1951b282f96SGreg Clayton   }
1961b282f96SGreg Clayton }
1971b282f96SGreg Clayton 
198b9c1b51eSKate Stone const char *SBWatchpoint::GetCondition() {
199baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBWatchpoint, GetCondition);
200baf5664fSJonas Devlieghere 
20181e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
202b9c1b51eSKate Stone   if (watchpoint_sp) {
203b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
204b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
20581e871edSGreg Clayton     return watchpoint_sp->GetConditionText();
20616dcf718SJohnny Chen   }
20716dcf718SJohnny Chen   return NULL;
20816dcf718SJohnny Chen }
20916dcf718SJohnny Chen 
210b9c1b51eSKate Stone void SBWatchpoint::SetCondition(const char *condition) {
211baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(void, SBWatchpoint, SetCondition, (const char *),
212baf5664fSJonas Devlieghere                      condition);
213baf5664fSJonas Devlieghere 
21481e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
215b9c1b51eSKate Stone   if (watchpoint_sp) {
216b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
217b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
21881e871edSGreg Clayton     watchpoint_sp->SetCondition(condition);
21916dcf718SJohnny Chen   }
22016dcf718SJohnny Chen }
22116dcf718SJohnny Chen 
222b9c1b51eSKate Stone bool SBWatchpoint::GetDescription(SBStream &description,
223b9c1b51eSKate Stone                                   DescriptionLevel level) {
224baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(bool, SBWatchpoint, GetDescription,
225baf5664fSJonas Devlieghere                      (lldb::SBStream &, lldb::DescriptionLevel), description,
226baf5664fSJonas Devlieghere                      level);
227baf5664fSJonas Devlieghere 
228da7bc7d0SGreg Clayton   Stream &strm = description.ref();
229da7bc7d0SGreg Clayton 
23081e871edSGreg Clayton   lldb::WatchpointSP watchpoint_sp(GetSP());
231b9c1b51eSKate Stone   if (watchpoint_sp) {
232b9c1b51eSKate Stone     std::lock_guard<std::recursive_mutex> guard(
233b9c1b51eSKate Stone         watchpoint_sp->GetTarget().GetAPIMutex());
23481e871edSGreg Clayton     watchpoint_sp->GetDescription(&strm, level);
235da7bc7d0SGreg Clayton     strm.EOL();
236b9c1b51eSKate Stone   } else
237da7bc7d0SGreg Clayton     strm.PutCString("No value");
2381b282f96SGreg Clayton 
2391b282f96SGreg Clayton   return true;
2401b282f96SGreg Clayton }
2411b282f96SGreg Clayton 
242baf5664fSJonas Devlieghere void SBWatchpoint::Clear() {
243baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_NO_ARGS(void, SBWatchpoint, Clear);
2441b282f96SGreg Clayton 
245baf5664fSJonas Devlieghere   m_opaque_wp.reset();
246baf5664fSJonas Devlieghere }
24781e871edSGreg Clayton 
248baf5664fSJonas Devlieghere lldb::WatchpointSP SBWatchpoint::GetSP() const {
249baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::WatchpointSP, SBWatchpoint, GetSP);
250baf5664fSJonas Devlieghere 
251baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(m_opaque_wp.lock());
252baf5664fSJonas Devlieghere }
253baf5664fSJonas Devlieghere 
254baf5664fSJonas Devlieghere void SBWatchpoint::SetSP(const lldb::WatchpointSP &sp) {
255baf5664fSJonas Devlieghere   LLDB_RECORD_METHOD(void, SBWatchpoint, SetSP, (const lldb::WatchpointSP &),
256baf5664fSJonas Devlieghere                      sp);
257baf5664fSJonas Devlieghere 
258baf5664fSJonas Devlieghere   m_opaque_wp = sp;
259baf5664fSJonas Devlieghere }
2601b5792e5SJim Ingham 
261b9c1b51eSKate Stone bool SBWatchpoint::EventIsWatchpointEvent(const lldb::SBEvent &event) {
262baf5664fSJonas Devlieghere   LLDB_RECORD_STATIC_METHOD(bool, SBWatchpoint, EventIsWatchpointEvent,
263baf5664fSJonas Devlieghere                             (const lldb::SBEvent &), event);
264baf5664fSJonas Devlieghere 
265b9c1b51eSKate Stone   return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.get()) !=
266b9c1b51eSKate Stone          NULL;
2671b5792e5SJim Ingham }
2681b5792e5SJim Ingham 
2691b5792e5SJim Ingham WatchpointEventType
270b9c1b51eSKate Stone SBWatchpoint::GetWatchpointEventTypeFromEvent(const SBEvent &event) {
271baf5664fSJonas Devlieghere   LLDB_RECORD_STATIC_METHOD(lldb::WatchpointEventType, SBWatchpoint,
272baf5664fSJonas Devlieghere                             GetWatchpointEventTypeFromEvent,
273baf5664fSJonas Devlieghere                             (const lldb::SBEvent &), event);
274baf5664fSJonas Devlieghere 
2751b5792e5SJim Ingham   if (event.IsValid())
276b9c1b51eSKate Stone     return Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent(
277b9c1b51eSKate Stone         event.GetSP());
2781b5792e5SJim Ingham   return eWatchpointEventTypeInvalidType;
2791b5792e5SJim Ingham }
2801b5792e5SJim Ingham 
281b9c1b51eSKate Stone SBWatchpoint SBWatchpoint::GetWatchpointFromEvent(const lldb::SBEvent &event) {
282baf5664fSJonas Devlieghere   LLDB_RECORD_STATIC_METHOD(lldb::SBWatchpoint, SBWatchpoint,
283baf5664fSJonas Devlieghere                             GetWatchpointFromEvent, (const lldb::SBEvent &),
284baf5664fSJonas Devlieghere                             event);
285baf5664fSJonas Devlieghere 
2861b5792e5SJim Ingham   SBWatchpoint sb_watchpoint;
2871b5792e5SJim Ingham   if (event.IsValid())
2887a1d34beSPavel Labath     sb_watchpoint =
289b9c1b51eSKate Stone         Watchpoint::WatchpointEventData::GetWatchpointFromEvent(event.GetSP());
290baf5664fSJonas Devlieghere   return LLDB_RECORD_RESULT(sb_watchpoint);
2911b5792e5SJim Ingham }
292*ae211eceSMichal Gorny 
293*ae211eceSMichal Gorny namespace lldb_private {
294*ae211eceSMichal Gorny namespace repro {
295*ae211eceSMichal Gorny 
296*ae211eceSMichal Gorny template <>
297*ae211eceSMichal Gorny void RegisterMethods<SBWatchpoint>(Registry &R) {
298*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, ());
299*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &));
300*ae211eceSMichal Gorny   LLDB_REGISTER_CONSTRUCTOR(SBWatchpoint, (const lldb::SBWatchpoint &));
301*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(const lldb::SBWatchpoint &,
302*ae211eceSMichal Gorny                        SBWatchpoint, operator=,(const lldb::SBWatchpoint &));
303*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::watch_id_t, SBWatchpoint, GetID, ());
304*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, IsValid, ());
305*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, operator bool, ());
306*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::SBError, SBWatchpoint, GetError, ());
307*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(int32_t, SBWatchpoint, GetHardwareIndex, ());
308*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(lldb::addr_t, SBWatchpoint, GetWatchAddress, ());
309*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(size_t, SBWatchpoint, GetWatchSize, ());
310*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBWatchpoint, SetEnabled, (bool));
311*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(bool, SBWatchpoint, IsEnabled, ());
312*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetHitCount, ());
313*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(uint32_t, SBWatchpoint, GetIgnoreCount, ());
314*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBWatchpoint, SetIgnoreCount, (uint32_t));
315*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(const char *, SBWatchpoint, GetCondition, ());
316*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBWatchpoint, SetCondition, (const char *));
317*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(bool, SBWatchpoint, GetDescription,
318*ae211eceSMichal Gorny                        (lldb::SBStream &, lldb::DescriptionLevel));
319*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBWatchpoint, Clear, ());
320*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD_CONST(lldb::WatchpointSP, SBWatchpoint, GetSP, ());
321*ae211eceSMichal Gorny   LLDB_REGISTER_METHOD(void, SBWatchpoint, SetSP,
322*ae211eceSMichal Gorny                        (const lldb::WatchpointSP &));
323*ae211eceSMichal Gorny   LLDB_REGISTER_STATIC_METHOD(bool, SBWatchpoint, EventIsWatchpointEvent,
324*ae211eceSMichal Gorny                               (const lldb::SBEvent &));
325*ae211eceSMichal Gorny   LLDB_REGISTER_STATIC_METHOD(lldb::WatchpointEventType, SBWatchpoint,
326*ae211eceSMichal Gorny                               GetWatchpointEventTypeFromEvent,
327*ae211eceSMichal Gorny                               (const lldb::SBEvent &));
328*ae211eceSMichal Gorny   LLDB_REGISTER_STATIC_METHOD(lldb::SBWatchpoint, SBWatchpoint,
329*ae211eceSMichal Gorny                               GetWatchpointFromEvent,
330*ae211eceSMichal Gorny                               (const lldb::SBEvent &));
331*ae211eceSMichal Gorny }
332*ae211eceSMichal Gorny 
333*ae211eceSMichal Gorny }
334*ae211eceSMichal Gorny }
335