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
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
45
47
48 LLDB_DEPRECATED("Hardware index is not available, always returns -1")
49 int32_t GetHardwareIndex();
50
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
77
79
81
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
void SetCondition(const char *condition)
const char * GetCondition()
void SetSP(const lldb::WatchpointSP &sp)
const char * GetWatchSpec()
bool GetDescription(lldb::SBStream &description, DescriptionLevel level)
friend class lldb_private::python::SWIGBridge
lldb::addr_t GetWatchAddress()
lldb::SBType GetType()
std::weak_ptr< lldb_private::Watchpoint > m_opaque_wp
bool operator==(const SBWatchpoint &rhs) const
friend class SBTarget
friend class SBValue
uint32_t GetIgnoreCount()
bool IsValid() const
void SetIgnoreCount(uint32_t n)
WatchpointValueKind GetWatchValueKind()
static lldb::WatchpointEventType GetWatchpointEventTypeFromEvent(const lldb::SBEvent &event)
int32_t GetHardwareIndex()
void SetEnabled(bool enabled)
static bool EventIsWatchpointEvent(const lldb::SBEvent &event)
static lldb::SBWatchpoint GetWatchpointFromEvent(const lldb::SBEvent &event)
bool operator!=(const SBWatchpoint &rhs) const
lldb::WatchpointSP GetSP() const
const lldb::SBWatchpoint & operator=(const lldb::SBWatchpoint &rhs)
A class that represents a running process on the host machine.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP
int32_t watch_id_t
Definition lldb-types.h:87
uint64_t addr_t
Definition lldb-types.h:80