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]
Collaboration diagram for lldb_private::ThreadPlanStepOut:
Collaboration 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. More...
 
bool ValidatePlan (Stream *error) override
 Returns whether this plan could be successfully created. More...
 
bool ShouldStop (Event *event_ptr) override
 
bool StopOthers () 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. More...
 
ThreadGetThread ()
 Returns the Thread that is using this thread plan. More...
 
TargetGetTarget ()
 
const TargetGetTarget () const
 
void ClearThreadCache ()
 Clear the Thread* cache. More...
 
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. More...
 
virtual Vote ShouldReportStop (Event *event_ptr)
 
Vote ShouldReportRun (Event *event_ptr)
 
virtual void SetStopOthers (bool new_value)
 
bool WillResume (lldb::StateType resume_state, bool current_plan)
 
bool IsMasterPlan ()
 
bool SetIsMasterPlan (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::ThreadPlanTracerSP & GetThreadPlanTracer ()
 
void SetThreadPlanTracer (lldb::ThreadPlanTracerSP new_tracer_sp)
 
void DoTraceLog ()
 
virtual lldb::ExpressionVariableSP GetExpressionVariable ()
 
virtual void RestoreThreadState ()
 
virtual bool IsVirtualStep ()
 
bool SetIterationCount (size_t count)
 
- Public Member Functions inherited from lldb_private::UserID
 UserID (lldb::user_id_t uid=LLDB_INVALID_UID)
 Construct with optional user ID. More...
 
 ~UserID ()=default
 Destructor. More...
 
void Clear ()
 Clears the object state. More...
 
lldb::user_id_t GetID () const
 Get accessor for the user ID. More...
 
void SetID (lldb::user_id_t uid)
 Set accessor for the user ID. More...
 
- 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 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::StackFrameSP > m_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
}
 
- 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. More...
 
- 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 34 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::GetLogIfAllCategoriesSet(), lldb_private::Address::GetOffset(), lldb_private::Thread::GetRegisterContext(), lldb_private::LineEntry::GetSameLineContiguousAddressRange(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetTarget(), lldb_private::Process::GetTarget(), lldb_private::Breakpoint::HasResolvedLocations(), lldb_private::Breakpoint::IsHardware(), lldb_private::LineEntry::IsValid(), LIBLLDB_LOG_STEP, 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(), and lldb_private::Address::Slide().

◆ ~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 194 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 389 of file ThreadPlanStepOut.cpp.

References lldb::eStateRunning.

◆ GetReturnValueObject()

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

Reimplemented from lldb_private::ThreadPlan.

Definition at line 39 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

◆ 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 387 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 240 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 74 of file ThreadPlanStepOut.h.

Referenced by CalculateReturnValue().

◆ m_constructor_errors

StreamString lldb_private::ThreadPlanStepOut::m_constructor_errors
private

Definition at line 75 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 71 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 58 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 60 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 73 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 56 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 68 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 57 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 72 of file ThreadPlanStepOut.h.

Referenced by GetDescription(), and ThreadPlanStepOut().

◆ m_stop_others

bool lldb_private::ThreadPlanStepOut::m_stop_others
private

Definition at line 61 of file ThreadPlanStepOut.h.

Referenced by QueueInlinedStepPlan(), and StopOthers().

◆ s_default_flag_values

uint32_t ThreadPlanStepOut::s_default_flag_values = 0
staticprivate

Definition at line 53 of file ThreadPlanStepOut.h.

Referenced by SetFlagsToDefault().


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