33 m_class_name(class_name), m_args_data(args_data), m_did_push(false),
34 m_stop_others(false) {
46 error->Printf(
"Error constructing Python ThreadPlan: %s",
68 this->shared_from_this());
75 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
78 bool should_stop =
true;
94 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
113 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
116 bool explains_stop =
true;
127 return explains_stop;
132 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
134 bool mischief_managed =
true;
139 if (mischief_managed)
142 return mischief_managed;
147 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
163 s->
Printf(
"Python thread plan implemented by class %s.",
169 LLDB_LOGF(log,
"%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
ScriptInterpreter * GetScriptInterpreter(bool can_create=true, std::optional< lldb::ScriptLanguage > language={})
Target & GetTarget()
Get the target object pointer for this module.
virtual StructuredData::ObjectSP CreateScriptedThreadPlan(const char *class_name, const StructuredDataImpl &args_data, std::string &error_str, lldb::ThreadPlanSP thread_plan_sp)
virtual bool ScriptedThreadPlanExplainsStop(StructuredData::ObjectSP implementor_sp, Event *event, bool &script_error)
virtual lldb::StateType ScriptedThreadPlanGetRunState(StructuredData::ObjectSP implementor_sp, bool &script_error)
virtual bool ScriptedThreadPlanShouldStop(StructuredData::ObjectSP implementor_sp, Event *event, bool &script_error)
virtual bool ScriptedThreadPlanIsStale(StructuredData::ObjectSP implementor_sp, bool &script_error)
A stream class that can stream formatted output to a file.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
ScriptInterpreter * GetScriptInterpreter()
bool ValidatePlan(Stream *error) override
Returns whether this plan could be successfully created.
bool DoPlanExplainsStop(Event *event_ptr) override
StructuredDataImpl m_args_data
StructuredData::ObjectSP m_implementation_sp
bool ShouldStop(Event *event_ptr) override
bool IsPlanStale() override
ThreadPlanPython(Thread &thread, const char *class_name, const StructuredDataImpl &args_data)
bool MischiefManaged() override
void GetDescription(Stream *s, lldb::DescriptionLevel level) override
Print a description of this thread to the stream s.
lldb::StateType GetPlanRunState() override
void SetPrivate(bool input)
void SetPlanComplete(bool success=true)
void SetOkayToDiscard(bool value)
bool SetIsControllingPlan(bool value)
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
StateType
Process and Thread States.
@ eStateRunning
Process or thread is running and can't be examined.