LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::AppleThreadPlanStepThroughObjCTrampoline Class Reference

#include <AppleThreadPlanStepThroughObjCTrampoline.h>

Inheritance diagram for lldb_private::AppleThreadPlanStepThroughObjCTrampoline:
Inheritance graph
[legend]

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.
 
ThreadGetThread ()
 Returns the Thread that is using this thread plan.
 
TargetGetTarget ()
 
const TargetGetTarget () 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::ThreadPlanTracerSPGetThreadPlanTracer ()
 
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)
 
ThreadPlanGetPreviousPlan ()
 
lldb::StopInfoSP GetPrivateStopInfo ()
 
void SetStopInfo (lldb::StopInfoSP stop_reason_sp)
 
bool IsUsuallyUnexplainedStopReason (lldb::StopReason)
 

Private Member Functions

bool InitializeFunctionCaller ()
 

Private Attributes

AppleObjCTrampolineHandlerm_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.
 
FunctionCallerm_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
 
Processm_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.
 

Detailed Description

Definition at line 23 of file AppleThreadPlanStepThroughObjCTrampoline.h.

Constructor & Destructor Documentation

◆ AppleThreadPlanStepThroughObjCTrampoline()

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.

◆ ~AppleThreadPlanStepThroughObjCTrampoline()

AppleThreadPlanStepThroughObjCTrampoline::~AppleThreadPlanStepThroughObjCTrampoline ( )
overridedefault

Member Function Documentation

◆ DidPush()

void AppleThreadPlanStepThroughObjCTrampoline::DidPush ( )
overridevirtual

◆ DoPlanExplainsStop()

bool AppleThreadPlanStepThroughObjCTrampoline::DoPlanExplainsStop ( Event event_ptr)
overrideprotectedvirtual

◆ GetDescription()

void AppleThreadPlanStepThroughObjCTrampoline::GetDescription ( Stream s,
lldb::DescriptionLevel  level 
)
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.

Parameters
[in]sThe stream to which to print the description.
[in]levelThe 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().

◆ GetPlanRunState()

lldb::StateType AppleThreadPlanStepThroughObjCTrampoline::GetPlanRunState ( )
overridevirtual

◆ InitializeFunctionCaller()

bool AppleThreadPlanStepThroughObjCTrampoline::InitializeFunctionCaller ( )
private

◆ MischiefManaged()

bool AppleThreadPlanStepThroughObjCTrampoline::MischiefManaged ( )
overridevirtual

◆ PreResumeInitializeFunctionCaller()

bool AppleThreadPlanStepThroughObjCTrampoline::PreResumeInitializeFunctionCaller ( void *  myself)
static

Definition at line 81 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.

References InitializeFunctionCaller().

Referenced by DidPush().

◆ ShouldStop()

bool AppleThreadPlanStepThroughObjCTrampoline::ShouldStop ( Event event_ptr)
overridevirtual

◆ StopOthers()

bool lldb_private::AppleThreadPlanStepThroughObjCTrampoline::StopOthers ( )
inlineoverridevirtual

Reimplemented from lldb_private::ThreadPlan.

Definition at line 44 of file AppleThreadPlanStepThroughObjCTrampoline.h.

◆ ValidatePlan()

bool AppleThreadPlanStepThroughObjCTrampoline::ValidatePlan ( Stream error)
overridevirtual

Returns whether this plan could be successfully created.

Parameters
[in]errorA stream to which to print some reason why the plan could not be created. Can be NULL.
Returns
true if the plan should be queued, false otherwise.

Implements lldb_private::ThreadPlan.

Definition at line 100 of file AppleThreadPlanStepThroughObjCTrampoline.cpp.

◆ WillStop()

bool AppleThreadPlanStepThroughObjCTrampoline::WillStop ( )
overridevirtual

Member Data Documentation

◆ m_args_addr

lldb::addr_t lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_args_addr
private

The handler itself.

Definition at line 61 of file AppleThreadPlanStepThroughObjCTrampoline.h.

Referenced by InitializeFunctionCaller(), and ShouldStop().

◆ m_func_sp

lldb::ThreadPlanSP lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_func_sp
private

◆ m_impl_function

FunctionCaller* lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_impl_function
private

The plan that runs to the target.

Definition at line 71 of file AppleThreadPlanStepThroughObjCTrampoline.h.

Referenced by InitializeFunctionCaller(), and ShouldStop().

◆ m_input_values

ValueList lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_input_values
private

Stores the address for our step through function result structure.

Definition at line 63 of file AppleThreadPlanStepThroughObjCTrampoline.h.

Referenced by GetDescription(), and InitializeFunctionCaller().

◆ m_isa_addr

lldb::addr_t lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_isa_addr
private

Definition at line 64 of file AppleThreadPlanStepThroughObjCTrampoline.h.

Referenced by GetDescription(), and ShouldStop().

◆ m_run_to_sp

lldb::ThreadPlanSP lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_run_to_sp
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().

◆ m_sel_addr

lldb::addr_t lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_sel_addr
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().

◆ m_sel_str

std::string lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_sel_str
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().

◆ m_sel_str_addr

lldb::addr_t lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_sel_str_addr
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().

◆ m_trampoline_handler

AppleObjCTrampolineHandler& lldb_private::AppleThreadPlanStepThroughObjCTrampoline::m_trampoline_handler
private

The documentation for this class was generated from the following files: