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

#include <ThreadPlanStepOut.h>

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

Public Member Functions

 ThreadPlanStepOut (Thread &thread, SymbolContext *addr_context, bool first_insn, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, LazyBool step_out_avoids_code_without_debug_info, bool continue_to_next_branch=false, bool gather_return_value=true)
 
 ~ThreadPlanStepOut () 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
 
bool StopOthers () override
 
void SetStopOthers (bool new_value) override
 
lldb::StateType GetPlanRunState () override
 
bool WillStop () override
 
bool MischiefManaged () override
 
void DidPush () override
 
bool IsPlanStale () override
 
lldb::ValueObjectSP GetReturnValueObject () 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.
 
- Public Member Functions inherited from lldb_private::ThreadPlanShouldStopHere
 ThreadPlanShouldStopHere (ThreadPlan *owner)
 
 ThreadPlanShouldStopHere (ThreadPlan *owner, const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton=nullptr)
 
virtual ~ThreadPlanShouldStopHere ()
 
void SetShouldStopHereCallbacks (const ThreadPlanShouldStopHereCallbacks *callbacks, void *baton)
 
void ClearShouldStopHereCallbacks ()
 
bool InvokeShouldStopHereCallback (lldb::FrameComparison operation, Status &status)
 
lldb::ThreadPlanSP CheckShouldStopHereAndQueueStepOut (lldb::FrameComparison operation, Status &status)
 
lldb_private::FlagsGetFlags ()
 
const lldb_private::FlagsGetFlags () const
 

Protected Member Functions

void SetFlagsToDefault () override
 
bool DoPlanExplainsStop (Event *event_ptr) override
 
bool DoWillResume (lldb::StateType resume_state, bool current_plan) override
 
bool QueueInlinedStepPlan (bool queue_now)
 
- 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)
 
- Protected Member Functions inherited from lldb_private::ThreadPlanShouldStopHere
virtual lldb::ThreadPlanSP QueueStepOutFromHerePlan (Flags &flags, lldb::FrameComparison operation, Status &status)
 
virtual void SetFlagsToDefault ()=0
 

Private Member Functions

void SetupAvoidNoDebug (LazyBool step_out_avoids_code_without_debug_info)
 
void CalculateReturnValue ()
 
 ThreadPlanStepOut (const ThreadPlanStepOut &)=delete
 
const ThreadPlanStepOutoperator= (const ThreadPlanStepOut &)=delete
 

Private Attributes

lldb::addr_t m_step_from_insn
 
StackID m_step_out_to_id
 
StackID m_immediate_step_from_id
 
lldb::break_id_t m_return_bp_id
 
lldb::addr_t m_return_addr
 
bool m_stop_others
 
lldb::ThreadPlanSP m_step_out_to_inline_plan_sp
 
lldb::ThreadPlanSP m_step_through_inline_plan_sp
 
lldb::ThreadPlanSP m_step_out_further_plan_sp
 
Functionm_immediate_step_from_function
 
std::vector< lldb::StackFrameSPm_stepped_past_frames
 
lldb::ValueObjectSP m_return_valobj_sp
 
bool m_calculate_return_value
 
StreamString m_constructor_errors
 

Static Private Attributes

static uint32_t s_default_flag_values = 0
 

Friends

lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOut (bool abort_other_plans, SymbolContext *addr_context, bool first_insn, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, Status &status, LazyBool step_out_avoids_code_without_debug_info)
 

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
}
 
- Public Types inherited from lldb_private::ThreadPlanShouldStopHere
enum  { eNone = 0 , eAvoidInlines = (1 << 0) , eStepInAvoidNoDebug = (1 << 1) , eStepOutAvoidNoDebug = (1 << 2) }
 
- Static Protected Member Functions inherited from lldb_private::ThreadPlanShouldStopHere
static bool DefaultShouldStopHereCallback (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, Status &status, void *baton)
 
static lldb::ThreadPlanSP DefaultStepFromHereCallback (ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation, Status &status, void *baton)
 
- 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.
 
- Protected Attributes inherited from lldb_private::ThreadPlanShouldStopHere
ThreadPlanShouldStopHereCallbacks m_callbacks
 
void * m_baton
 
ThreadPlanm_owner
 
lldb_private::Flags m_flags
 

Detailed Description

Definition at line 18 of file ThreadPlanStepOut.h.

Constructor & Destructor Documentation

◆ ThreadPlanStepOut() [1/2]

ThreadPlanStepOut::ThreadPlanStepOut ( Thread thread,
SymbolContext addr_context,
bool  first_insn,
bool  stop_others,
Vote  report_stop_vote,
Vote  report_run_vote,
uint32_t  frame_idx,
LazyBool  step_out_avoids_code_without_debug_info,
bool  continue_to_next_branch = false,
bool  gather_return_value = true 
)

Definition at line 35 of file ThreadPlanStepOut.cpp.

References lldb_private::Process::AdvanceAddressToNextBranchInstruction(), lldb_private::Address::CalculateSymbolContext(), lldb_private::Target::CreateBreakpoint(), lldb_private::eLazyBoolNo, lldb_private::eVoteNoOpinion, lldb_private::SymbolContext::function, lldb_private::AddressRange::GetByteSize(), lldb_private::StreamString::GetData(), lldb_private::Stoppoint::GetID(), lldb_private::Address::GetLoadAddress(), lldb_private::Process::GetLoadAddressPermissions(), lldb_private::GetLog(), lldb_private::Address::GetOffset(), lldb_private::Thread::GetRegisterContext(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::Process::GetTarget(), lldb_private::ThreadPlan::GetTarget(), lldb_private::Breakpoint::HasResolvedLocations(), lldb_private::Breakpoint::IsHardware(), lldb_private::LineEntry::IsValid(), lldb_private::SymbolContext::line_entry, LLDB_INVALID_ADDRESS, LLDB_LOG, LLDB_LOGF, m_constructor_errors, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_immediate_step_from_function, m_immediate_step_from_id, lldb_private::ThreadPlan::m_process, m_return_addr, m_return_bp_id, m_step_from_insn, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_stepped_past_frames, lldb_private::ThreadPlan::m_tid, lldb_private::Stream::Printf(), QueueInlinedStepPlan(), lldb_private::Breakpoint::SetBreakpointKind(), SetFlagsToDefault(), lldb_private::ThreadPlanShouldStopHere::SetShouldStopHereCallbacks(), lldb_private::Breakpoint::SetThreadID(), SetupAvoidNoDebug(), lldb_private::Address::Slide(), and lldb_private::Step.

◆ ~ThreadPlanStepOut()

ThreadPlanStepOut::~ThreadPlanStepOut ( )
override

◆ ThreadPlanStepOut() [2/2]

lldb_private::ThreadPlanStepOut::ThreadPlanStepOut ( const ThreadPlanStepOut )
privatedelete

Member Function Documentation

◆ CalculateReturnValue()

void ThreadPlanStepOut::CalculateReturnValue ( )
private

◆ DidPush()

void ThreadPlanStepOut::DidPush ( )
overridevirtual

◆ DoPlanExplainsStop()

bool ThreadPlanStepOut::DoPlanExplainsStop ( Event event_ptr)
overrideprotectedvirtual

◆ DoWillResume()

bool ThreadPlanStepOut::DoWillResume ( lldb::StateType  resume_state,
bool  current_plan 
)
overrideprotectedvirtual

◆ GetDescription()

void ThreadPlanStepOut::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.

Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.

Definition at line 195 of file ThreadPlanStepOut.cpp.

References lldb_private::Address::Dump(), lldb_private::Address::DumpStyleLoadAddress, lldb_private::Address::DumpStyleResolvedDescription, lldb::eDescriptionLevelBrief, lldb::eDescriptionLevelVerbose, lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::m_process, m_return_addr, m_return_bp_id, m_step_from_insn, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, m_stepped_past_frames, lldb_private::Stream::Printf(), and lldb_private::Address::SetLoadAddress().

◆ GetPlanRunState()

StateType ThreadPlanStepOut::GetPlanRunState ( )
overridevirtual

Implements lldb_private::ThreadPlan.

Definition at line 390 of file ThreadPlanStepOut.cpp.

References lldb::eStateRunning.

◆ GetReturnValueObject()

lldb::ValueObjectSP lldb_private::ThreadPlanStepOut::GetReturnValueObject ( )
inlineoverridevirtual

Reimplemented from lldb_private::ThreadPlan.

Definition at line 40 of file ThreadPlanStepOut.h.

References m_return_valobj_sp.

◆ IsPlanStale()

bool ThreadPlanStepOut::IsPlanStale ( )
overridevirtual

◆ MischiefManaged()

bool ThreadPlanStepOut::MischiefManaged ( )
overridevirtual

◆ operator=()

const ThreadPlanStepOut & lldb_private::ThreadPlanStepOut::operator= ( const ThreadPlanStepOut )
privatedelete

◆ QueueInlinedStepPlan()

bool ThreadPlanStepOut::QueueInlinedStepPlan ( bool  queue_now)
protected

◆ SetFlagsToDefault()

void lldb_private::ThreadPlanStepOut::SetFlagsToDefault ( )
inlineoverrideprotectedvirtual

◆ SetStopOthers()

void lldb_private::ThreadPlanStepOut::SetStopOthers ( bool  new_value)
inlineoverridevirtual

Reimplemented from lldb_private::ThreadPlan.

Definition at line 33 of file ThreadPlanStepOut.h.

References m_stop_others.

◆ SetupAvoidNoDebug()

void ThreadPlanStepOut::SetupAvoidNoDebug ( LazyBool  step_out_avoids_code_without_debug_info)
private

◆ ShouldStop()

bool ThreadPlanStepOut::ShouldStop ( Event event_ptr)
overridevirtual

◆ StopOthers()

bool ThreadPlanStepOut::StopOthers ( )
overridevirtual

Reimplemented from lldb_private::ThreadPlan.

Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.

Definition at line 388 of file ThreadPlanStepOut.cpp.

References m_stop_others.

◆ ValidatePlan()

bool ThreadPlanStepOut::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 241 of file ThreadPlanStepOut.cpp.

References error(), lldb_private::StreamString::GetSize(), lldb_private::StreamString::GetString(), LLDB_INVALID_BREAK_ID, m_constructor_errors, lldb_private::ThreadPlan::m_could_not_resolve_hw_bp, m_return_bp_id, m_step_out_to_inline_plan_sp, and m_step_through_inline_plan_sp.

◆ WillStop()

bool ThreadPlanStepOut::WillStop ( )
overridevirtual

Friends And Related Function Documentation

◆ Thread::QueueThreadPlanForStepOut

lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOut ( bool  abort_other_plans,
SymbolContext addr_context,
bool  first_insn,
bool  stop_others,
Vote  report_stop_vote,
Vote  report_run_vote,
uint32_t  frame_idx,
Status status,
LazyBool  step_out_avoids_code_without_debug_info 
)
friend

Member Data Documentation

◆ m_calculate_return_value

bool lldb_private::ThreadPlanStepOut::m_calculate_return_value
private

Definition at line 75 of file ThreadPlanStepOut.h.

Referenced by CalculateReturnValue().

◆ m_constructor_errors

StreamString lldb_private::ThreadPlanStepOut::m_constructor_errors
private

Definition at line 76 of file ThreadPlanStepOut.h.

Referenced by ThreadPlanStepOut(), and ValidatePlan().

◆ m_immediate_step_from_function

Function* lldb_private::ThreadPlanStepOut::m_immediate_step_from_function
private

Definition at line 72 of file ThreadPlanStepOut.h.

Referenced by CalculateReturnValue(), and ThreadPlanStepOut().

◆ m_immediate_step_from_id

StackID lldb_private::ThreadPlanStepOut::m_immediate_step_from_id
private

Definition at line 59 of file ThreadPlanStepOut.h.

Referenced by DoPlanExplainsStop(), and ThreadPlanStepOut().

◆ m_return_addr

lldb::addr_t lldb_private::ThreadPlanStepOut::m_return_addr
private

Definition at line 61 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), and ThreadPlanStepOut().

◆ m_return_bp_id

lldb::break_id_t lldb_private::ThreadPlanStepOut::m_return_bp_id
private

◆ m_return_valobj_sp

lldb::ValueObjectSP lldb_private::ThreadPlanStepOut::m_return_valobj_sp
private

Definition at line 74 of file ThreadPlanStepOut.h.

Referenced by CalculateReturnValue(), and GetReturnValueObject().

◆ m_step_from_insn

lldb::addr_t lldb_private::ThreadPlanStepOut::m_step_from_insn
private

Definition at line 57 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), and ThreadPlanStepOut().

◆ m_step_out_further_plan_sp

lldb::ThreadPlanSP lldb_private::ThreadPlanStepOut::m_step_out_further_plan_sp
private

Definition at line 69 of file ThreadPlanStepOut.h.

Referenced by DoPlanExplainsStop(), and ShouldStop().

◆ m_step_out_to_id

StackID lldb_private::ThreadPlanStepOut::m_step_out_to_id
private

Definition at line 58 of file ThreadPlanStepOut.h.

Referenced by DoPlanExplainsStop(), IsPlanStale(), ShouldStop(), and ThreadPlanStepOut().

◆ m_step_out_to_inline_plan_sp

lldb::ThreadPlanSP lldb_private::ThreadPlanStepOut::m_step_out_to_inline_plan_sp
private

◆ m_step_through_inline_plan_sp

lldb::ThreadPlanSP lldb_private::ThreadPlanStepOut::m_step_through_inline_plan_sp
private

◆ m_stepped_past_frames

std::vector<lldb::StackFrameSP> lldb_private::ThreadPlanStepOut::m_stepped_past_frames
private

Definition at line 73 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), and ThreadPlanStepOut().

◆ m_stop_others

bool lldb_private::ThreadPlanStepOut::m_stop_others
private

Definition at line 62 of file ThreadPlanStepOut.h.

Referenced by QueueInlinedStepPlan(), SetStopOthers(), and StopOthers().

◆ s_default_flag_values

uint32_t ThreadPlanStepOut::s_default_flag_values = 0
staticprivate

Definition at line 54 of file ThreadPlanStepOut.h.

Referenced by SetFlagsToDefault().


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