9#ifndef LLDB_BREAKPOINT_WATCHPOINTOPTIONS_H
10#define LLDB_BREAKPOINT_WATCHPOINTOPTIONS_H
179 unsigned indentation)
const override;
186 std::unique_ptr<ThreadSpec>
A class designed to wrap callback batons so they can cleanup any acquired resources.
General Outline: When we hit a breakpoint we need to package up whatever information is needed to eva...
A stream class that can stream formatted output to a file.
CommandBaton(std::unique_ptr< CommandData > Data)
void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level, unsigned indentation) const override
"lldb/Breakpoint/WatchpointOptions.h" Class that manages the options on a watchpoint.
virtual ~WatchpointOptions()
const WatchpointOptions & operator=(const WatchpointOptions &rhs)
static WatchpointOptions * CopyOptionsNoCallback(WatchpointOptions &rhs)
void SetThreadID(lldb::tid_t thread_id)
void ClearCallback()
Remove the callback from this option set.
bool HasCallback()
Returns true if the watchpoint option has a callback set.
std::unique_ptr< ThreadSpec > m_thread_spec_up
void GetDescription(Stream *s, lldb::DescriptionLevel level) const
static bool NullCallback(void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id)
This is the default empty callback.
bool InvokeCallback(StoppointCallbackContext *context, lldb::user_id_t watch_id)
Use this function to invoke the callback for a specific stop.
void SetCallback(WatchpointHitCallback callback, const lldb::BatonSP &baton_sp, bool synchronous=false)
Adds a callback to the watchpoint option set.
bool m_callback_is_synchronous
WatchpointHitCallback m_callback
void GetCallbackDescription(Stream *s, lldb::DescriptionLevel level) const
Get description for callback only.
lldb::BatonSP m_callback_baton_sp
WatchpointOptions()
Default constructor.
const ThreadSpec * GetThreadSpecNoCreate() const
Return the current thread spec for this option.
bool IsCallbackSynchronous()
Used in InvokeCallback to tell whether it is the right time to run this kind of callback.
Baton * GetBaton()
Fetch the baton from the callback.
WatchpointOptions(WatchpointHitCallback callback, void *baton, lldb::tid_t thread_id=LLDB_INVALID_THREAD_ID)
This constructor allows you to specify all the watchpoint options.
ThreadSpec * GetThreadSpec()
Returns a pointer to the ThreadSpec for this option, creating it if it hasn't been created already.
#define LLDB_INVALID_THREAD_ID
A class that represents a running process on the host machine.
bool(* WatchpointHitCallback)(void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id)
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::Baton > BatonSP
std::string script_source