57 watch_id = watchpoint_sp->GetID();
64 return this->
operator bool();
66SBWatchpoint::operator
bool()
const {
81 return !(*
this == rhs);
90 sb_error.
SetError(watchpoint_sp->GetError().Clone());
112 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
113 std::lock_guard<TargetAPIMutex> guard(api_lock);
114 ret_addr = watchpoint_sp->GetLoadAddress();
123 size_t watch_size = 0;
127 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
128 std::lock_guard<TargetAPIMutex> guard(api_lock);
129 watch_size = watchpoint_sp->GetByteSize();
140 Target &target = watchpoint_sp->GetTarget();
142 std::lock_guard<TargetAPIMutex> guard(api_lock);
144 const bool notify =
true;
147 process_sp->EnableWatchpoint(watchpoint_sp, notify);
149 process_sp->DisableWatchpoint(watchpoint_sp, notify);
151 watchpoint_sp->SetEnabled(enabled, notify);
161 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
162 std::lock_guard<TargetAPIMutex> guard(api_lock);
163 return watchpoint_sp->IsEnabled();
174 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
175 std::lock_guard<TargetAPIMutex> guard(api_lock);
176 count = watchpoint_sp->GetHitCount();
187 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
188 std::lock_guard<TargetAPIMutex> guard(api_lock);
189 return watchpoint_sp->GetIgnoreCount();
199 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
200 std::lock_guard<TargetAPIMutex> guard(api_lock);
201 watchpoint_sp->SetIgnoreCount(n);
212 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
213 std::lock_guard<TargetAPIMutex> guard(api_lock);
215 .
Intern(watchpoint_sp->GetConditionText());
223 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
224 std::lock_guard<TargetAPIMutex> guard(api_lock);
225 watchpoint_sp->SetCondition(condition);
237 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
238 std::lock_guard<TargetAPIMutex> guard(api_lock);
239 watchpoint_sp->GetDescription(&strm, level);
279 return eWatchpointEventTypeInvalidType;
289 return sb_watchpoint;
297 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
298 std::lock_guard<TargetAPIMutex> guard(api_lock);
299 const CompilerType &type = watchpoint_sp->GetCompilerType();
310 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
311 std::lock_guard<TargetAPIMutex> guard(api_lock);
312 if (watchpoint_sp->IsWatchVariable())
326 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
327 std::lock_guard<TargetAPIMutex> guard(api_lock);
336 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
337 std::lock_guard<TargetAPIMutex> guard(api_lock);
339 return watchpoint_sp->WatchpointRead();
349 TargetAPIMutex api_lock = watchpoint_sp->GetTarget().GetAPIMutex();
350 std::lock_guard<TargetAPIMutex> guard(api_lock);
352 return watchpoint_sp->WatchpointWrite() ||
353 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 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.
const char * Intern(llvm::StringRef str) const
const char * InternNonEmpty(llvm::StringRef str) const
Like Intern, but an empty string yields nullptr.
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.
StringPoolRef GetDebuggerStringPool(const Target &target)
Strings interned here live as long as target's debugger.
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