LLDB mainline
|
#include <ThreadPlanCallFunction.h>
Public Member Functions | |
ThreadPlanCallFunction (Thread &thread, const Address &function, const CompilerType &return_type, llvm::ArrayRef< lldb::addr_t > args, const EvaluateExpressionOptions &options) | |
ThreadPlanCallFunction (Thread &thread, const Address &function, const EvaluateExpressionOptions &options) | |
~ThreadPlanCallFunction () override | |
void | GetDescription (Stream *s, lldb::DescriptionLevel level) override |
Print a description of this thread to the stream s. | |
bool | ValidatePlan (Stream *error) override |
Returns whether this plan could be successfully created. | |
bool | ShouldStop (Event *event_ptr) override |
Vote | ShouldReportStop (Event *event_ptr) override |
bool | StopOthers () override |
lldb::StateType | GetPlanRunState () override |
void | DidPush () override |
bool | WillStop () override |
bool | MischiefManaged () override |
lldb::ValueObjectSP | GetReturnValueObject () override |
lldb::addr_t | GetFunctionStackPointer () |
void | DidPop () override |
virtual lldb::StopInfoSP | GetRealStopInfo () |
lldb::addr_t | GetStopAddress () |
void | RestoreThreadState () override |
void | ThreadDestroyed () override |
void | SetStopOthers (bool new_value) override |
Public Member Functions inherited from lldb_private::ThreadPlan | |
virtual | ~ThreadPlan () |
const char * | GetName () const |
Returns the name of this thread plan. | |
Thread & | GetThread () |
Returns the Thread that is using this thread plan. | |
Target & | GetTarget () |
const Target & | GetTarget () const |
void | ClearThreadCache () |
Clear the Thread* cache. | |
virtual void | GetDescription (Stream *s, lldb::DescriptionLevel level)=0 |
Print a description of this thread to the stream s. | |
virtual bool | ValidatePlan (Stream *error)=0 |
Returns whether this plan could be successfully created. | |
bool | TracerExplainsStop () |
lldb::StateType | RunState () |
bool | PlanExplainsStop (Event *event_ptr) |
virtual bool | ShouldStop (Event *event_ptr)=0 |
virtual bool | ShouldAutoContinue (Event *event_ptr) |
Returns whether this thread plan overrides the ShouldStop of subsequently processed plans. | |
virtual Vote | ShouldReportStop (Event *event_ptr) |
Vote | ShouldReportRun (Event *event_ptr) |
virtual void | SetStopOthers (bool new_value) |
virtual bool | StopOthers () |
virtual bool | SupportsResumeOthers () |
virtual bool | ShouldRunBeforePublicStop () |
bool | WillResume (lldb::StateType resume_state, bool current_plan) |
virtual bool | WillStop ()=0 |
bool | IsControllingPlan () |
virtual bool | IsLeafPlan () |
bool | SetIsControllingPlan (bool value) |
virtual bool | OkayToDiscard () |
void | SetOkayToDiscard (bool value) |
virtual bool | MischiefManaged () |
virtual void | ThreadDestroyed () |
bool | GetPrivate () |
void | SetPrivate (bool input) |
virtual void | DidPush () |
virtual void | DidPop () |
ThreadPlanKind | GetKind () const |
bool | IsPlanComplete () |
void | SetPlanComplete (bool success=true) |
virtual bool | IsPlanStale () |
bool | PlanSucceeded () |
virtual bool | IsBasePlan () |
lldb::ThreadPlanTracerSP & | GetThreadPlanTracer () |
void | SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp) |
void | DoTraceLog () |
virtual lldb::ValueObjectSP | GetReturnValueObject () |
virtual lldb::ExpressionVariableSP | GetExpressionVariable () |
virtual void | RestoreThreadState () |
virtual bool | IsVirtualStep () |
bool | SetIterationCount (size_t count) |
virtual lldb::StateType | GetPlanRunState ()=0 |
Public Member Functions inherited from lldb_private::UserID | |
UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
Construct with optional user ID. | |
~UserID ()=default | |
Destructor. | |
void | Clear () |
Clears the object state. | |
lldb::user_id_t | GetID () const |
Get accessor for the user ID. | |
void | SetID (lldb::user_id_t uid) |
Set accessor for the user ID. | |
Protected Member Functions | |
void | ReportRegisterState (const char *message) |
bool | DoPlanExplainsStop (Event *event_ptr) override |
virtual void | SetReturnValue () |
bool | ConstructorSetup (Thread &thread, ABI *&abi, lldb::addr_t &start_load_addr, lldb::addr_t &function_load_addr) |
virtual void | DoTakedown (bool success) |
void | SetBreakpoints () |
void | ClearBreakpoints () |
bool | BreakpointsExplainStop () |
Protected Member Functions inherited from lldb_private::ThreadPlan | |
ThreadPlan (ThreadPlanKind kind, const char *name, Thread &thread, Vote report_stop_vote, Vote report_run_vote) | |
virtual bool | DoWillResume (lldb::StateType resume_state, bool current_plan) |
virtual bool | DoPlanExplainsStop (Event *event_ptr)=0 |
void | PushPlan (lldb::ThreadPlanSP &thread_plan_sp) |
ThreadPlan * | GetPreviousPlan () |
lldb::StopInfoSP | GetPrivateStopInfo () |
void | SetStopInfo (lldb::StopInfoSP stop_reason_sp) |
bool | IsUsuallyUnexplainedStopReason (lldb::StopReason) |
Private Member Functions | |
ThreadPlanCallFunction (const ThreadPlanCallFunction &)=delete | |
const ThreadPlanCallFunction & | operator= (const ThreadPlanCallFunction &)=delete |
Private Attributes | |
CompilerType | m_return_type |
Additional Inherited Members | |
Public Types inherited from lldb_private::ThreadPlan | |
enum | ThreadPlanKind { eKindGeneric , eKindNull , eKindBase , eKindCallFunction , eKindPython , eKindStepInstruction , eKindStepOut , eKindStepOverBreakpoint , eKindStepOverRange , eKindStepInRange , eKindRunToAddress , eKindStepThrough , eKindStepUntil , eKindSingleThreadTimeout } |
Definition at line 20 of file ThreadPlanCallFunction.h.
lldb_private::ThreadPlanCallFunction::ThreadPlanCallFunction | ( | Thread & | thread, |
const Address & | function, | ||
const CompilerType & | return_type, | ||
llvm::ArrayRef< lldb::addr_t > | args, | ||
const EvaluateExpressionOptions & | options | ||
) |
ThreadPlanCallFunction::ThreadPlanCallFunction | ( | Thread & | thread, |
const Address & | function, | ||
const EvaluateExpressionOptions & | options | ||
) |
Definition at line 130 of file ThreadPlanCallFunction.cpp.
|
override |
Definition at line 148 of file ThreadPlanCallFunction.cpp.
References DoTakedown(), and lldb_private::ThreadPlan::PlanSucceeded().
|
privatedelete |
|
protected |
Definition at line 432 of file ThreadPlanCallFunction.cpp.
References lldb_private::LanguageRuntime::ExceptionBreakpointsExplainStop(), lldb_private::GetLog(), lldb_private::ThreadPlan::GetPrivateStopInfo(), LLDB_LOGF, m_cxx_language_runtime, m_objc_language_runtime, m_trap_exceptions, lldb_private::ThreadPlan::SetPlanComplete(), and lldb_private::Step.
Referenced by DoPlanExplainsStop().
|
protected |
Definition at line 423 of file ThreadPlanCallFunction.cpp.
References lldb_private::LanguageRuntime::ClearExceptionBreakpoints(), m_cxx_language_runtime, m_objc_language_runtime, m_should_clear_cxx_exception_bp, m_should_clear_objc_exception_bp, and m_trap_exceptions.
Referenced by DoTakedown().
|
protected |
Definition at line 34 of file ThreadPlanCallFunction.cpp.
References lldb_private::Thread::CheckpointThreadState(), error(), lldb_private::StreamString::GetData(), lldb_private::Target::GetEntryPointAddress(), lldb_private::Address::GetLoadAddress(), lldb_private::GetLog(), lldb_private::Thread::GetProcess(), lldb_private::ABI::GetRedZoneSize(), lldb_private::Thread::GetRegisterContext(), lldb_private::ThreadPlan::GetTarget(), lldb_private::Log::GetVerbose(), LLDB_LOGF, m_constructor_errors, m_function_addr, m_function_sp, m_start_addr, m_stored_thread_state, lldb_private::Stream::Printf(), ReportRegisterState(), SetBreakpoints(), lldb_private::ThreadPlan::SetIsControllingPlan(), lldb_private::ThreadPlan::SetOkayToDiscard(), lldb_private::ThreadPlan::SetPrivate(), and lldb_private::Step.
Referenced by lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::ThreadPlanCallUserExpression.
Definition at line 219 of file ThreadPlanCallFunction.cpp.
References DoTakedown(), and lldb_private::ThreadPlan::PlanSucceeded().
Referenced by lldb_private::ThreadPlanCallUserExpression::DidPop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::ThreadPlanCallUserExpression.
Definition at line 369 of file ThreadPlanCallFunction.cpp.
References lldb_private::ThreadPlan::GetThread(), m_start_addr, m_stop_other_threads, m_subplan_sp, lldb_private::Thread::QueueThreadPlan(), and lldb_private::Thread::SetStopInfoToNothing().
Referenced by lldb_private::ThreadPlanCallUserExpression::DidPush().
|
overrideprotectedvirtual |
Implements lldb_private::ThreadPlan.
Definition at line 251 of file ThreadPlanCallFunction.cpp.
References BreakpointsExplainStop(), lldb::eStopReasonBreakpoint, lldb::eStopReasonNone, lldb_private::StopPointSiteList< StopPointSite >::FindByID(), lldb_private::Process::GetBreakpointSiteList(), lldb_private::Stoppoint::GetID(), lldb_private::Process::ProcessEventData::GetInterruptedFromEvent(), lldb_private::GetLog(), lldb_private::ThreadPlan::GetPrivateStopInfo(), lldb_private::Breakpoint::IsInternal(), LLDB_LOG, LLDB_LOGF, m_ignore_breakpoints, lldb_private::ThreadPlan::m_process, m_real_stop_info_sp, m_subplan_sp, m_unwind_on_error, lldb_private::Process, lldb_private::ThreadPlan::SetPlanComplete(), lldb_private::Step, and lldb_private::Thread::StopReasonAsString().
Referenced by ShouldStop().
|
protectedvirtual |
Reimplemented in lldb_private::ThreadPlanCallUserExpression.
Definition at line 175 of file ThreadPlanCallFunction.cpp.
References ClearBreakpoints(), lldb_private::GetLog(), lldb_private::ThreadPlan::GetPrivateStopInfo(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::Log::GetVerbose(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_LOGF, m_real_stop_info_sp, m_stop_address, m_stored_thread_state, m_takedown_done, lldb_private::ThreadPlan::m_tid, m_valid, ReportRegisterState(), lldb_private::Thread::RestoreRegisterStateFromCheckpoint(), lldb_private::ThreadPlan::SetPlanComplete(), SetReturnValue(), and lldb_private::Step.
Referenced by DidPop(), lldb_private::ThreadPlanCallUserExpression::DoTakedown(), and ~ThreadPlanCallFunction().
|
overridevirtual |
Print a description of this thread to the stream s.
thread. Don't expect that the result of GetThread is valid in the description method. This might get called when the underlying Thread has not been reported, so we only know the TID and not the thread.
[in] | s | The stream to which to print the description. |
[in] | level | The level of description desired. Note that eDescriptionLevelBrief will be used in the stop message printed when the plan is complete. |
Implements lldb_private::ThreadPlan.
Reimplemented in lldb_private::ThreadPlanCallFunctionUsingABI, and lldb_private::ThreadPlanCallUserExpression.
Definition at line 221 of file ThreadPlanCallFunction.cpp.
References lldb::eDescriptionLevelBrief, lldb_private::Address::GetLoadAddress(), lldb_private::ThreadPlan::GetTarget(), m_function_addr, and lldb_private::Stream::Printf().
Referenced by lldb_private::ThreadPlanCallUserExpression::GetDescription().
|
inline |
Definition at line 69 of file ThreadPlanCallFunction.h.
References m_function_sp.
Referenced by lldb_private::LLVMUserExpression::DoExecute(), and lldb_private::ThreadPlanCallUserExpression::MischiefManaged().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 367 of file ThreadPlanCallFunction.cpp.
References lldb::eStateRunning.
|
inlinevirtual |
Reimplemented in lldb_private::ThreadPlanCallUserExpression.
Definition at line 84 of file ThreadPlanCallFunction.h.
References lldb_private::ThreadPlan::GetPrivateStopInfo(), and m_real_stop_info_sp.
Referenced by lldb_private::ThreadPlanCallUserExpression::GetRealStopInfo().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 62 of file ThreadPlanCallFunction.h.
References m_return_valobj_sp.
|
inline |
Definition at line 91 of file ThreadPlanCallFunction.h.
References m_stop_address.
Referenced by lldb_private::ThreadPlanCallUserExpression::GetRealStopInfo().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::ThreadPlanCallUserExpression.
Definition at line 390 of file ThreadPlanCallFunction.cpp.
References lldb_private::GetLog(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_LOGF, lldb_private::ThreadPlan::MischiefManaged(), and lldb_private::Step.
|
privatedelete |
|
protected |
Definition at line 152 of file ThreadPlanCallFunction.cpp.
References lldb_private::DumpRegisterValue(), lldb::eFormatDefault, lldb_private::Stream::EOL(), lldb_private::GetLog(), lldb_private::Thread::GetRegisterContext(), lldb_private::RegisterContext::GetRegisterCount(), lldb_private::RegisterContext::GetRegisterInfoAtIndex(), lldb_private::StreamString::GetString(), lldb_private::ThreadPlan::GetThread(), lldb_private::Log::GetVerbose(), lldb_private::Log::PutCString(), lldb_private::Log::PutString(), lldb_private::RegisterContext::ReadRegister(), and lldb_private::Step.
Referenced by ConstructorSetup(), DoTakedown(), ShouldStop(), and lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 463 of file ThreadPlanCallFunction.cpp.
References lldb_private::ThreadPlan::GetThread(), m_stored_thread_state, and lldb_private::Thread::RestoreThreadStateFromCheckpoint().
|
protected |
Definition at line 404 of file ThreadPlanCallFunction.cpp.
References lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeObjC, lldb_private::LanguageRuntime::ExceptionBreakpointsAreSet(), lldb_private::Process::GetLanguageRuntime(), m_cxx_language_runtime, m_objc_language_runtime, lldb_private::ThreadPlan::m_process, m_should_clear_cxx_exception_bp, m_should_clear_objc_exception_bp, m_trap_exceptions, and lldb_private::LanguageRuntime::SetExceptionBreakpoints().
Referenced by ConstructorSetup().
|
protectedvirtual |
Reimplemented in lldb_private::ThreadPlanCallFunctionUsingABI.
Definition at line 467 of file ThreadPlanCallFunction.cpp.
References lldb_private::Process::GetABI(), lldb_private::ABI::GetReturnValueObject(), lldb_private::ThreadPlan::GetThread(), lldb_private::CompilerType::IsValid(), lldb_private::ThreadPlan::m_process, m_return_type, and m_return_valobj_sp.
Referenced by DoTakedown().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 459 of file ThreadPlanCallFunction.cpp.
References m_subplan_sp.
Reimplemented from lldb_private::ThreadPlan.
Definition at line 244 of file ThreadPlanCallFunction.cpp.
References lldb_private::eVoteYes, lldb_private::ThreadPlan::IsPlanComplete(), m_takedown_done, and lldb_private::ThreadPlan::ShouldReportStop().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 351 of file ThreadPlanCallFunction.cpp.
References DoPlanExplainsStop(), lldb_private::ThreadPlan::IsPlanComplete(), and ReportRegisterState().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 365 of file ThreadPlanCallFunction.cpp.
References m_stop_other_threads.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 95 of file ThreadPlanCallFunction.h.
References m_takedown_done.
|
overridevirtual |
Returns whether this plan could be successfully created.
[in] | error | A stream to which to print some reason why the plan could not be created. Can be NULL. |
Implements lldb_private::ThreadPlan.
Definition at line 230 of file ThreadPlanCallFunction.cpp.
References error(), lldb_private::StreamString::GetSize(), lldb_private::StreamString::GetString(), m_constructor_errors, and m_valid.
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 388 of file ThreadPlanCallFunction.cpp.
|
protected |
Definition at line 136 of file ThreadPlanCallFunction.h.
Referenced by ConstructorSetup(), and ValidatePlan().
|
protected |
Definition at line 128 of file ThreadPlanCallFunction.h.
Referenced by BreakpointsExplainStop(), ClearBreakpoints(), and SetBreakpoints().
|
protected |
Definition at line 122 of file ThreadPlanCallFunction.h.
|
protected |
Definition at line 124 of file ThreadPlanCallFunction.h.
Referenced by ConstructorSetup(), GetDescription(), and lldb_private::ThreadPlanCallFunctionUsingABI::GetDescription().
|
protected |
Definition at line 126 of file ThreadPlanCallFunction.h.
Referenced by ConstructorSetup(), GetFunctionStackPointer(), and lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI().
|
protected |
Definition at line 121 of file ThreadPlanCallFunction.h.
Referenced by DoPlanExplainsStop().
|
protected |
Definition at line 129 of file ThreadPlanCallFunction.h.
Referenced by BreakpointsExplainStop(), ClearBreakpoints(), and SetBreakpoints().
|
protected |
Definition at line 132 of file ThreadPlanCallFunction.h.
Referenced by DoPlanExplainsStop(), DoTakedown(), and GetRealStopInfo().
|
private |
Definition at line 148 of file ThreadPlanCallFunction.h.
Referenced by SetReturnValue().
|
protected |
Definition at line 137 of file ThreadPlanCallFunction.h.
Referenced by GetReturnValueObject(), SetReturnValue(), and lldb_private::ThreadPlanCallFunctionUsingABI::SetReturnValue().
|
protected |
Definition at line 143 of file ThreadPlanCallFunction.h.
Referenced by ClearBreakpoints(), and SetBreakpoints().
|
protected |
Definition at line 142 of file ThreadPlanCallFunction.h.
Referenced by ClearBreakpoints(), and SetBreakpoints().
|
protected |
Definition at line 125 of file ThreadPlanCallFunction.h.
Referenced by ConstructorSetup(), and DidPush().
|
protected |
Definition at line 144 of file ThreadPlanCallFunction.h.
Referenced by DoTakedown(), and GetStopAddress().
|
protected |
Definition at line 119 of file ThreadPlanCallFunction.h.
Referenced by DidPush(), and StopOthers().
|
protected |
Definition at line 130 of file ThreadPlanCallFunction.h.
Referenced by ConstructorSetup(), DoTakedown(), and RestoreThreadState().
|
protected |
Definition at line 127 of file ThreadPlanCallFunction.h.
Referenced by DidPush(), DoPlanExplainsStop(), and SetStopOthers().
|
protected |
Definition at line 140 of file ThreadPlanCallFunction.h.
Referenced by DoTakedown(), ShouldReportStop(), and ThreadDestroyed().
|
protected |
Definition at line 123 of file ThreadPlanCallFunction.h.
Referenced by BreakpointsExplainStop(), ClearBreakpoints(), and SetBreakpoints().
|
protected |
Definition at line 120 of file ThreadPlanCallFunction.h.
Referenced by DoPlanExplainsStop().
|
protected |
Definition at line 118 of file ThreadPlanCallFunction.h.
Referenced by DoTakedown(), lldb_private::ThreadPlanCallFunctionUsingABI::ThreadPlanCallFunctionUsingABI(), and ValidatePlan().