LLDB mainline
|
#include <AppleThreadPlanStepThroughObjCTrampoline.h>
Public Member Functions | |
AppleThreadPlanStepThroughObjCTrampoline (Thread &thread, AppleObjCTrampolineHandler &trampoline_handler, ValueList &values, lldb::addr_t isa_addr, lldb::addr_t sel_addr, lldb::addr_t sel_str_addr, llvm::StringRef sel_str) | |
~AppleThreadPlanStepThroughObjCTrampoline () 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. | |
lldb::StateType | GetPlanRunState () override |
bool | ShouldStop (Event *event_ptr) override |
bool | StopOthers () override |
bool | MischiefManaged () override |
void | DidPush () override |
bool | WillStop () 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 | 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. | |
Static Public Member Functions | |
static bool | PreResumeInitializeFunctionCaller (void *myself) |
Protected Member Functions | |
bool | DoPlanExplainsStop (Event *event_ptr) override |
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 | |
bool | InitializeFunctionCaller () |
Private Attributes | |
AppleObjCTrampolineHandler & | m_trampoline_handler |
lldb::addr_t | m_args_addr |
The handler itself. | |
ValueList | m_input_values |
Stores the address for our step through function result structure. | |
lldb::addr_t | m_isa_addr |
lldb::addr_t | m_sel_addr |
isa_addr and sel_addr are the keys we will use to cache the implementation. | |
lldb::ThreadPlanSP | m_func_sp |
lldb::ThreadPlanSP | m_run_to_sp |
This is the function call plan. | |
FunctionCaller * | m_impl_function |
The plan that runs to the target. | |
lldb::addr_t | m_sel_str_addr |
This is a pointer to a impl function that is owned by the client that pushes this plan. | |
std::string | m_sel_str |
If this is not LLDB_INVALID_ADDRESS then it is the address we wrote the selector string to. | |
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 } |
Protected Attributes inherited from lldb_private::ThreadPlan | |
Status | m_status |
Process & | m_process |
lldb::tid_t | m_tid |
Vote | m_report_stop_vote |
Vote | m_report_run_vote |
bool | m_takes_iteration_count |
bool | m_could_not_resolve_hw_bp |
int32_t | m_iteration_count = 1 |
Protected Attributes inherited from lldb_private::UserID | |
lldb::user_id_t | m_uid |
The user ID that uniquely identifies an object. | |
Definition at line 23 of file AppleThreadPlanStepThroughObjCTrampoline.h.
AppleThreadPlanStepThroughObjCTrampoline::AppleThreadPlanStepThroughObjCTrampoline | ( | Thread & | thread, |
AppleObjCTrampolineHandler & | trampoline_handler, | ||
ValueList & | values, | ||
lldb::addr_t | isa_addr, | ||
lldb::addr_t | sel_addr, | ||
lldb::addr_t | sel_str_addr, | ||
llvm::StringRef | sel_str | ||
) |
Definition at line 32 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
|
overridedefault |
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 49 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb_private::Process::AddPreResumeAction(), lldb_private::ThreadPlan::m_process, and PreResumeInitializeFunctionCaller().
|
overrideprotectedvirtual |
Implements lldb_private::ThreadPlan.
Definition at line 104 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
|
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.
Definition at line 88 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb::eDescriptionLevelBrief, lldb_private::Value::GetScalar(), lldb_private::ValueList::GetValueAtIndex(), m_input_values, m_isa_addr, m_sel_addr, lldb_private::Stream::Printf(), and lldb_private::Scalar::ULongLong().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 112 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb::eStateRunning.
|
private |
Definition at line 56 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb_private::Thread::CalculateExecutionContext(), lldb_private::AppleObjCTrampolineHandler::GetLookupImplementationFunctionCaller(), lldb_private::ThreadPlan::GetThread(), lldb_private::FunctionCaller::GetThreadPlanToCallFunction(), LLDB_INVALID_ADDRESS, m_args_addr, m_func_sp, m_impl_function, m_input_values, m_trampoline_handler, lldb_private::ThreadPlan::PushPlan(), lldb_private::EvaluateExpressionOptions::SetIgnoreBreakpoints(), lldb_private::EvaluateExpressionOptions::SetStopOthers(), lldb_private::EvaluateExpressionOptions::SetUnwindOnError(), and lldb_private::AppleObjCTrampolineHandler::SetupDispatchFunction().
Referenced by PreResumeInitializeFunctionCaller().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 214 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb_private::ThreadPlan::IsPlanComplete().
|
static |
Definition at line 81 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References InitializeFunctionCaller().
Referenced by DidPush().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 116 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
References lldb_private::AppleObjCTrampolineHandler::AddrIsMsgForward(), lldb_private::ObjCLanguageRuntime::AddToMethodCache(), lldb_private::Thread::CalculateExecutionContext(), lldb_private::FunctionCaller::DeallocateFunctionResults(), lldb_private::eVoteNoOpinion, lldb_private::Status::Fail(), lldb_private::FunctionCaller::FetchFunctionResults(), lldb_private::ObjCLanguageRuntime::Get(), lldb_private::GetLog(), lldb_private::Thread::GetProcess(), lldb_private::Value::GetScalar(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ThreadPlan::GetThread(), LLDB_INVALID_ADDRESS, LLDB_LOG, LLDB_LOGF, m_args_addr, m_func_sp, m_impl_function, m_isa_addr, m_run_to_sp, m_sel_addr, m_sel_str, m_sel_str_addr, m_trampoline_handler, lldb_private::ThreadPlan::PushPlan(), lldb_private::Thread::QueueThreadPlanForStepOutNoShouldStop(), lldb_private::Address::SetOpcodeLoadAddress(), lldb_private::ThreadPlan::SetPlanComplete(), lldb_private::Step, lldb_private::Status::Success(), and lldb_private::Scalar::ULongLong().
|
inlineoverridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 44 of file AppleThreadPlanStepThroughObjCTrampoline.h.
|
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 100 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 218 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.
|
private |
The handler itself.
Definition at line 61 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by InitializeFunctionCaller(), and ShouldStop().
|
private |
Definition at line 67 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by InitializeFunctionCaller(), and ShouldStop().
|
private |
The plan that runs to the target.
Definition at line 71 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by InitializeFunctionCaller(), and ShouldStop().
|
private |
Stores the address for our step through function result structure.
Definition at line 63 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by GetDescription(), and InitializeFunctionCaller().
|
private |
Definition at line 64 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by GetDescription(), and ShouldStop().
|
private |
This is the function call plan.
We fill it at start, then set it to NULL when this plan is done. That way we know to go on to:
Definition at line 70 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by ShouldStop().
|
private |
isa_addr and sel_addr are the keys we will use to cache the implementation.
Definition at line 66 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by GetDescription(), and ShouldStop().
|
private |
If this is not LLDB_INVALID_ADDRESS then it is the address we wrote the selector string to.
We need to deallocate it when the function call is done.
Definition at line 78 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by ShouldStop().
|
private |
This is a pointer to a impl function that is owned by the client that pushes this plan.
Definition at line 74 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by ShouldStop().
|
private |
Definition at line 60 of file AppleThreadPlanStepThroughObjCTrampoline.h.
Referenced by InitializeFunctionCaller(), and ShouldStop().