LLDB mainline
lldb_private::ThreadPlanStepOut Class Reference

#include <ThreadPlanStepOut.h>

Inheritance diagram for lldb_private::ThreadPlanStepOut:
[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)
 Creates a thread plan to step out from frame_idx, skipping parent frames if they are artificial or hidden frames.
 ThreadPlanStepOut (Thread &thread, bool stop_others, Vote report_stop_vote, Vote report_run_vote, uint32_t frame_idx, bool continue_to_next_branch=false, bool gather_return_value=true)
 Creates a thread plan to step out from frame_idx to frame_idx + 1.
 ~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.
bool TracerExplainsStop ()
lldb::StateType RunState ()
bool PlanExplainsStop (Event *event_ptr)
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 bool SupportsResumeOthers ()
virtual bool ShouldRunBeforePublicStop ()
bool WillResume (lldb::StateType resume_state, bool current_plan)
bool IsControllingPlan ()
virtual bool IsLeafPlan ()
bool SetIsControllingPlan (bool value)
virtual bool OkayToDiscard ()
void SetOkayToDiscard (bool value)
virtual void ThreadDestroyed ()
bool GetPrivate ()
void SetPrivate (bool input)
virtual void DidPop ()
ThreadPlanKind GetKind () const
bool IsPlanComplete ()
void SetPlanComplete (bool success=true)
bool PlanSucceeded ()
virtual bool IsBasePlan ()
lldb::ThreadPlanTracerSPGetThreadPlanTracer ()
void SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp)
void DoTraceLog ()
virtual lldb::ExpressionVariableSP GetExpressionVariable ()
virtual void RestoreThreadState ()
virtual bool IsVirtualStep ()
bool SetIterationCount (size_t count)
virtual lldb::RunDirection GetDirection () const
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)
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)

Private Member Functions

void SetupAvoidNoDebug (LazyBool step_out_avoids_code_without_debug_info)
void SetupReturnAddress (lldb::StackFrameSP return_frame_sp, lldb::StackFrameSP immediate_return_from_sp, uint32_t frame_idx, bool continue_to_next_branch)
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) ,
  eStepOutPastThunks = (1 << 3)
}
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/3]

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 )

◆ ThreadPlanStepOut() [2/3]

ThreadPlanStepOut::ThreadPlanStepOut ( Thread & thread,
bool stop_others,
Vote report_stop_vote,
Vote report_run_vote,
uint32_t frame_idx,
bool continue_to_next_branch = false,
bool gather_return_value = true )

◆ ~ThreadPlanStepOut()

ThreadPlanStepOut::~ThreadPlanStepOut ( )
override

◆ ThreadPlanStepOut() [3/3]

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

References ThreadPlanStepOut().

Member Function Documentation

◆ CalculateReturnValue()

void ThreadPlanStepOut::CalculateReturnValue ( )
private

◆ DidPush()

void ThreadPlanStepOut::DidPush ( )
overridevirtual

◆ DoPlanExplainsStop()

◆ DoWillResume()

◆ 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.

Definition at line 235 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 433 of file ThreadPlanStepOut.cpp.

References lldb::eStateRunning.

◆ GetReturnValueObject()

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

Reimplemented from lldb_private::ThreadPlan.

Definition at line 49 of file ThreadPlanStepOut.h.

References m_return_valobj_sp.

◆ IsPlanStale()

bool ThreadPlanStepOut::IsPlanStale ( )
overridevirtual

◆ MischiefManaged()

◆ operator=()

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

References ThreadPlanStepOut().

◆ QueueInlinedStepPlan()

◆ 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 42 of file ThreadPlanStepOut.h.

References m_stop_others.

◆ SetupAvoidNoDebug()

◆ SetupReturnAddress()

void ThreadPlanStepOut::SetupReturnAddress ( lldb::StackFrameSP return_frame_sp,
lldb::StackFrameSP immediate_return_from_sp,
uint32_t frame_idx,
bool continue_to_next_branch )
private

◆ ShouldStop()

◆ StopOthers()

bool ThreadPlanStepOut::StopOthers ( )
overridevirtual

Reimplemented from lldb_private::ThreadPlan.

Definition at line 431 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 281 of file ThreadPlanStepOut.cpp.

References error(), 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()

◆ 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 84 of file ThreadPlanStepOut.h.

Referenced by CalculateReturnValue(), ThreadPlanStepOut(), and ThreadPlanStepOut().

◆ m_constructor_errors

StreamString lldb_private::ThreadPlanStepOut::m_constructor_errors
private

Definition at line 85 of file ThreadPlanStepOut.h.

Referenced by SetupReturnAddress(), and ValidatePlan().

◆ m_immediate_step_from_function

Function* lldb_private::ThreadPlanStepOut::m_immediate_step_from_function
private

◆ m_immediate_step_from_id

StackID lldb_private::ThreadPlanStepOut::m_immediate_step_from_id
private

Definition at line 68 of file ThreadPlanStepOut.h.

Referenced by DoPlanExplainsStop(), and SetupReturnAddress().

◆ m_return_addr

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

◆ m_return_bp_id

◆ m_return_valobj_sp

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

Definition at line 83 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 66 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), ThreadPlanStepOut(), and ThreadPlanStepOut().

◆ m_step_out_further_plan_sp

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

Definition at line 78 of file ThreadPlanStepOut.h.

Referenced by DoPlanExplainsStop(), and ShouldStop().

◆ m_step_out_to_id

StackID lldb_private::ThreadPlanStepOut::m_step_out_to_id
private

◆ 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 82 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), and ThreadPlanStepOut().

◆ m_stop_others

bool lldb_private::ThreadPlanStepOut::m_stop_others
private

◆ s_default_flag_values

uint32_t ThreadPlanStepOut::s_default_flag_values = 0
staticprivate

Definition at line 63 of file ThreadPlanStepOut.h.

Referenced by SetFlagsToDefault().


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