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 {
16
18public:
20
22
23#ifndef SWIG
24 SBWatchpoint(const lldb::WatchpointSP &wp_sp);
25#endif
26
28
29 const lldb::SBWatchpoint &operator=(const lldb::SBWatchpoint &rhs);
30
31 explicit operator bool() const;
32
33 bool operator==(const SBWatchpoint &rhs) const;
34
35 bool operator!=(const SBWatchpoint &rhs) const;
36
37 bool IsValid() const;
38
39 SBError GetError();
40
41 watch_id_t GetID();
42
43 /// With -1 representing an invalid hardware index.
44 int32_t GetHardwareIndex();
45
46 lldb::addr_t GetWatchAddress();
47
48 size_t GetWatchSize();
49
50 void SetEnabled(bool enabled);
51
52 bool IsEnabled();
53
54 uint32_t GetHitCount();
55
56 uint32_t GetIgnoreCount();
57
58 void SetIgnoreCount(uint32_t n);
59
60 const char *GetCondition();
61
62 void SetCondition(const char *condition);
63
64 bool GetDescription(lldb::SBStream &description, DescriptionLevel level);
65
66 void Clear();
67
68#ifndef SWIG
69 lldb::WatchpointSP GetSP() const;
70
71 void SetSP(const lldb::WatchpointSP &sp);
72#endif
73
74 static bool EventIsWatchpointEvent(const lldb::SBEvent &event);
75
76 static lldb::WatchpointEventType
77 GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event);
78
79 static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event);
80
81 lldb::SBType GetType();
82
83 WatchpointValueKind GetWatchValueKind();
84
85 const char *GetWatchSpec();
86
87 bool IsWatchingReads();
88
89 bool IsWatchingWrites();
90
91private:
92 friend class SBTarget;
93 friend class SBValue;
94
95 std::weak_ptr<lldb_private::Watchpoint> m_opaque_wp;
96};
97
98} // namespace lldb
99
100#endif // LLDB_API_SBWATCHPOINT_H
bool operator!=(const DWARFBaseDIE &lhs, const DWARFBaseDIE &rhs)
bool operator==(const DWARFBaseDIE &lhs, const DWARFBaseDIE &rhs)
#define LLDB_API
Definition: SBDefines.h:26
std::weak_ptr< lldb_private::Watchpoint > m_opaque_wp
Definition: SBWatchpoint.h:95
Definition: SBAddress.h:15
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
int32_t watch_id_t
Definition: lldb-types.h:89
uint64_t addr_t
Definition: lldb-types.h:83