56 watch_id = watchpoint_sp->GetID();
63 return this->
operator bool();
65SBWatchpoint::operator
bool()
const {
80 return !(*
this == rhs);
89 sb_error.
SetError(watchpoint_sp->GetError().Clone());
111 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
112 std::lock_guard<TargetAPIMutex> guard(api_lock);
113 ret_addr = watchpoint_sp->GetLoadAddress();
122 size_t watch_size = 0;
126 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
127 std::lock_guard<TargetAPIMutex> guard(api_lock);
128 watch_size = watchpoint_sp->GetByteSize();
139 Target &target = watchpoint_sp->GetTarget();
141 std::lock_guard<TargetAPIMutex> guard(api_lock);
143 const bool notify =
true;
146 process_sp->EnableWatchpoint(watchpoint_sp, notify);
148 process_sp->DisableWatchpoint(watchpoint_sp, notify);
150 watchpoint_sp->SetEnabled(enabled, notify);
160 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
161 std::lock_guard<TargetAPIMutex> guard(api_lock);
162 return watchpoint_sp->IsEnabled();
173 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
174 std::lock_guard<TargetAPIMutex> guard(api_lock);
175 count = watchpoint_sp->GetHitCount();
186 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
187 std::lock_guard<TargetAPIMutex> guard(api_lock);
188 return watchpoint_sp->GetIgnoreCount();
198 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
199 std::lock_guard<TargetAPIMutex> guard(api_lock);
200 watchpoint_sp->SetIgnoreCount(n);
211 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
212 std::lock_guard<TargetAPIMutex> guard(api_lock);
221 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
222 std::lock_guard<TargetAPIMutex> guard(api_lock);
223 watchpoint_sp->SetCondition(condition);
235 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
236 std::lock_guard<TargetAPIMutex> guard(api_lock);
237 watchpoint_sp->GetDescription(&strm, level);
277 return eWatchpointEventTypeInvalidType;
287 return sb_watchpoint;
295 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
296 std::lock_guard<TargetAPIMutex> guard(api_lock);
297 const CompilerType &type = watchpoint_sp->GetCompilerType();
308 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
309 std::lock_guard<TargetAPIMutex> guard(api_lock);
310 if (watchpoint_sp->IsWatchVariable())
324 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
325 std::lock_guard<TargetAPIMutex> guard(api_lock);
337 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
338 std::lock_guard<TargetAPIMutex> guard(api_lock);
340 return watchpoint_sp->WatchpointRead();
350 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
351 std::lock_guard<TargetAPIMutex> guard(api_lock);
353 return watchpoint_sp->WatchpointWrite() ||
354 watchpoint_sp->WatchpointModify();
#define LLDB_INSTRUMENT_VA(...)
void SetError(uint32_t err, lldb::ErrorType type)
lldb_private::Event * get() const
lldb::EventSP & GetSP() const
lldb_private::Stream & ref()
void SetCondition(const char *condition)
const char * GetCondition()
void SetSP(const lldb::WatchpointSP &sp)
const char * GetWatchSpec()
bool GetDescription(lldb::SBStream &description, DescriptionLevel level)
lldb::addr_t GetWatchAddress()
std::weak_ptr< lldb_private::Watchpoint > m_opaque_wp
bool operator==(const SBWatchpoint &rhs) const
uint32_t GetIgnoreCount()
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)
Generic representation of a type in a programming language.
A uniqued constant string class.
const char * GetCString() const
Get the string value as a C string.
const char * AsCString(const char *value_if_empty) const
Get the string value as a C string.
A stream class that can stream formatted output to a file.
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
size_t EOL()
Output and End of Line character to the stream.
A Lockable handle over a Target's API mutex, returned by Target::GetAPIMutex() and backing the public...
TargetAPIMutex GetAPIMutex()
Returns a handle resolved to the mutex to serialize on before touching the target through the SB API.
const lldb::ProcessSP & GetProcessSP() const
static lldb::WatchpointSP GetWatchpointFromEvent(const lldb::EventSP &event_sp)
static lldb::WatchpointEventType GetWatchpointEventTypeFromEvent(const lldb::EventSP &event_sp)
static const WatchpointEventData * GetEventDataFromEvent(const Event *event_sp)
#define LLDB_INVALID_WATCH_ID
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
@ eWatchPointValueKindInvalid
@ eWatchPointValueKindExpression
Watchpoint was created watching the result of an expression that was evaluated at creation time.
@ eWatchPointValueKindVariable
Watchpoint was created watching a variable.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::Watchpoint > WatchpointSP