32 : m_opaque_wp(wp_sp) {
37 : m_opaque_wp(rhs.m_opaque_wp) {
54 lldb::WatchpointSP watchpoint_sp(
GetSP());
56 watch_id = watchpoint_sp->GetID();
63 return this->
operator bool();
65 SBWatchpoint::operator bool()
const {
68 return bool(m_opaque_wp.lock());
80 return !(*
this == rhs);
87 lldb::WatchpointSP watchpoint_sp(
GetSP());
89 sb_error.
SetError(watchpoint_sp->GetError());
97 int32_t hw_index = -1;
99 lldb::WatchpointSP watchpoint_sp(
GetSP());
101 std::lock_guard<std::recursive_mutex> guard(
102 watchpoint_sp->GetTarget().GetAPIMutex());
103 hw_index = watchpoint_sp->GetHardwareIndex();
114 lldb::WatchpointSP watchpoint_sp(
GetSP());
116 std::lock_guard<std::recursive_mutex> guard(
117 watchpoint_sp->GetTarget().GetAPIMutex());
118 ret_addr = watchpoint_sp->GetLoadAddress();
127 size_t watch_size = 0;
129 lldb::WatchpointSP watchpoint_sp(
GetSP());
131 std::lock_guard<std::recursive_mutex> guard(
132 watchpoint_sp->GetTarget().GetAPIMutex());
133 watch_size = watchpoint_sp->GetByteSize();
142 lldb::WatchpointSP watchpoint_sp(
GetSP());
144 Target &target = watchpoint_sp->GetTarget();
145 std::lock_guard<std::recursive_mutex> guard(target.
GetAPIMutex());
147 const bool notify =
true;
150 process_sp->EnableWatchpoint(watchpoint_sp.get(), notify);
152 process_sp->DisableWatchpoint(watchpoint_sp.get(), notify);
154 watchpoint_sp->SetEnabled(enabled, notify);
162 lldb::WatchpointSP watchpoint_sp(
GetSP());
164 std::lock_guard<std::recursive_mutex> guard(
165 watchpoint_sp->GetTarget().GetAPIMutex());
166 return watchpoint_sp->IsEnabled();
175 lldb::WatchpointSP watchpoint_sp(
GetSP());
177 std::lock_guard<std::recursive_mutex> guard(
178 watchpoint_sp->GetTarget().GetAPIMutex());
179 count = watchpoint_sp->GetHitCount();
188 lldb::WatchpointSP watchpoint_sp(
GetSP());
190 std::lock_guard<std::recursive_mutex> guard(
191 watchpoint_sp->GetTarget().GetAPIMutex());
192 return watchpoint_sp->GetIgnoreCount();
200 lldb::WatchpointSP watchpoint_sp(
GetSP());
202 std::lock_guard<std::recursive_mutex> guard(
203 watchpoint_sp->GetTarget().GetAPIMutex());
204 watchpoint_sp->SetIgnoreCount(n);
211 lldb::WatchpointSP watchpoint_sp(
GetSP());
213 std::lock_guard<std::recursive_mutex> guard(
214 watchpoint_sp->GetTarget().GetAPIMutex());
215 return watchpoint_sp->GetConditionText();
223 lldb::WatchpointSP watchpoint_sp(
GetSP());
225 std::lock_guard<std::recursive_mutex> guard(
226 watchpoint_sp->GetTarget().GetAPIMutex());
227 watchpoint_sp->SetCondition(condition);
237 lldb::WatchpointSP watchpoint_sp(
GetSP());
239 std::lock_guard<std::recursive_mutex> guard(
240 watchpoint_sp->GetTarget().GetAPIMutex());
241 watchpoint_sp->GetDescription(&strm, level);
270 return Watchpoint::WatchpointEventData::GetEventDataFromEvent(event.
get()) !=
279 return Watchpoint::WatchpointEventData::GetWatchpointEventTypeFromEvent(
281 return eWatchpointEventTypeInvalidType;
290 Watchpoint::WatchpointEventData::GetWatchpointFromEvent(event.
GetSP());
291 return sb_watchpoint;