Go to the documentation of this file.
22 bool WatchpointOptions::NullCallback(
void *baton,
29 WatchpointOptions::WatchpointOptions()
34 : m_callback(rhs.m_callback), m_callback_baton_sp(rhs.m_callback_baton_sp),
35 m_callback_is_synchronous(rhs.m_callback_is_synchronous) {
53 WatchpointHitCallback orig_callback = orig.
m_callback;
60 orig.
SetCallback(orig_callback, orig_callback_baton_sp, orig_is_sync);
70 const BatonSP &callback_baton_sp,
71 bool callback_is_synchronous) {
159 unsigned indentation)
const {
163 s <<
", commands = %s"
164 << ((
data &&
data->user_source.GetSize() > 0) ?
"yes" :
"no");
169 s.indent(indentation);
170 s <<
"watchpoint commands:\n";
173 if (
data &&
data->user_source.GetSize() > 0) {
175 s.indent(indentation);
179 s <<
"No commands.\n";
void IndentLess(unsigned amount=2)
Decrement the current indentation level.
const ThreadSpec * GetThreadSpecNoCreate() const
Return the current thread spec for this option.
void SetThreadID(lldb::tid_t thread_id)
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
void GetCallbackDescription(Stream *s, lldb::DescriptionLevel level) const
Get description for callback only.
WatchpointOptions()
Default constructor.
void SetCallback(WatchpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the watchpoint option set.
bool InvokeCallback(StoppointCallbackContext *context, lldb::user_id_t watch_id)
Use this function to invoke the callback for a specific stop.
Baton * GetBaton()
Fetch the baton from the callback.
std::unique_ptr< ThreadSpec > m_thread_spec_up
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level, unsigned indentation) const override
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
virtual ~WatchpointOptions()
const WatchpointOptions & operator=(const WatchpointOptions &rhs)
unsigned GetIndentLevel() const
Get the current indentation level.
bool IsCallbackSynchronous()
Used in InvokeCallback to tell whether it is the right time to run this kind of callback.
string(SUBSTRING ${p} 10 -1 pStripped) if($
void SetTID(lldb::tid_t tid)
lldb::BatonSP m_callback_baton_sp
bool HasCallback()
Returns true if the watchpoint option has a callback set.
void IndentMore(unsigned amount=2)
Increment the current indentation level.
size_t EOL()
Output and End of Line character to the stream.
llvm::raw_ostream & AsRawOstream()
Returns a raw_ostream that forwards the data to this Stream object.
static bool NullCallback(void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id)
This is the default empty callback.
void ClearCallback()
Remove the callback from this option set.
A class that represents a running process on the host machine.
@ eDescriptionLevelVerbose
WatchpointHitCallback m_callback
static WatchpointOptions * CopyOptionsNoCallback(WatchpointOptions &rhs)
size_t PutCString(llvm::StringRef cstr)
Output a C string to the stream.
bool m_callback_is_synchronous
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.