LLDB mainline
SBWatchpoint.h
Go to the documentation of this file.
1//===-- SBWatchpoint.h ----------------------------------*- 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#ifndef LLDB_API_SBWATCHPOINT_H
10#define LLDB_API_SBWATCHPOINT_H
11
12#include "lldb/API/SBDefines.h"
13#include "lldb/API/SBType.h"
14
15namespace lldb_private {
16namespace python {
17class SWIGBridge;
18}
19namespace lua {
20class SWIGBridge;
21}
22} // namespace lldb_private
23
24namespace lldb {
25
27public:
29
31
33
34 const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
35
36 explicit operator bool() const;
37
38 bool operator==(const SBWatchpoint &rhs) const;
39
40 bool operator!=(const SBWatchpoint &rhs) const;
41
42 bool IsValid() const;
43
44 SBError GetError();
45
46 watch_id_t GetID();
47
48 LLDB_DEPRECATED("Hardware index is not available, always returns -1")
49 int32_t GetHardwareIndex();
50
51 lldb::addr_t GetWatchAddress();
52
53 size_t GetWatchSize();
54
55 void SetEnabled(bool enabled);
56
57 bool IsEnabled();
58
59 uint32_t GetHitCount();
60
61 uint32_t GetIgnoreCount();
62
63 void SetIgnoreCount(uint32_t n);
64
65 const char *GetCondition();
66
67 void SetCondition(const char *condition);
68
69 bool GetDescription(lldb::SBStream &description, DescriptionLevel level);
70
71 void Clear();
72
73 static bool EventIsWatchpointEvent(const lldb::SBEvent &event);
74
75 static lldb::WatchpointEventType
76 GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event);
77
78 static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event);
79
80 lldb::SBType GetType();
81
82 WatchpointValueKind GetWatchValueKind();
83
84 const char *GetWatchSpec();
85
86 bool IsWatchingReads();
87
88 bool IsWatchingWrites();
89
90protected:
91 friend class lldb_private::python::SWIGBridge;
92 friend class lldb_private::lua::SWIGBridge;
93
94 SBWatchpoint(const lldb::WatchpointSP &wp_sp);
95
96 lldb::WatchpointSP GetSP() const;
97
98 void SetSP(const lldb::WatchpointSP &sp);
99
100private:
101 friend class SBTarget;
102 friend class SBValue;
103
104 std::weak_ptr<lldb_private::Watchpoint> m_opaque_wp;
105};
106
107} // namespace lldb
108
109#endif // LLDB_API_SBWATCHPOINT_H
#define LLDB_API
Definition: SBDefines.h:28
#define LLDB_DEPRECATED(MSG)
Definition: SBDefines.h:38
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
Definition: SBAddress.h:15
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP
Definition: lldb-forward.h:477
int32_t watch_id_t
Definition: lldb-types.h:85
uint64_t addr_t
Definition: lldb-types.h:79
bool LLDB_API operator==(const SBAddress &lhs, const SBAddress &rhs)
Definition: SBAddress.cpp:60