1 //===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 namespace lldb {
10 
11 %feature("docstring",
12 "Represents an instance of watchpoint for a specific target program.
13 
14 A watchpoint is determined by the address and the byte size that resulted in
15 this particular instantiation.  Each watchpoint has its settable options.
16 
17 See also SBTarget.watchpoint_iter() for example usage of iterating through the
18 watchpoints of the target."
19 ) SBWatchpoint;
20 class SBWatchpoint
21 {
22 public:
23 
24     SBWatchpoint ();
25 
26     SBWatchpoint (const lldb::SBWatchpoint &rhs);
27 
28     ~SBWatchpoint ();
29 
30     bool
31     IsValid();
32 
33     explicit operator bool() const;
34 
35     bool operator==(const SBWatchpoint &rhs) const;
36 
37     bool operator!=(const SBWatchpoint &rhs) const;
38 
39     SBError
40     GetError();
41 
42     watch_id_t
43     GetID ();
44 
45     %feature("docstring", "
46     With -1 representing an invalid hardware index.") GetHardwareIndex;
47     int32_t
48     GetHardwareIndex ();
49 
50     lldb::addr_t
51     GetWatchAddress ();
52 
53     size_t
54     GetWatchSize();
55 
56     void
57     SetEnabled(bool enabled);
58 
59     bool
60     IsEnabled ();
61 
62     uint32_t
63     GetHitCount ();
64 
65     uint32_t
66     GetIgnoreCount ();
67 
68     void
69     SetIgnoreCount (uint32_t n);
70 
71     %feature("docstring", "
72     Get the condition expression for the watchpoint.") GetCondition;
73     const char *
74     GetCondition ();
75 
76     %feature("docstring", "
77     The watchpoint stops only if the condition expression evaluates to true.") SetCondition;
78     void
79     SetCondition (const char *condition);
80 
81     bool
82     GetDescription (lldb::SBStream &description, DescriptionLevel level);
83 
84     static bool
85     EventIsWatchpointEvent (const lldb::SBEvent &event);
86 
87     static lldb::WatchpointEventType
88     GetWatchpointEventTypeFromEvent (const lldb::SBEvent& event);
89 
90     static lldb::SBWatchpoint
91     GetWatchpointFromEvent (const lldb::SBEvent& event);
92 
93     STRING_EXTENSION_LEVEL(SBWatchpoint, lldb::eDescriptionLevelVerbose)
94 };
95 
96 } // namespace lldb
97