LLDB mainline
|
#include <ThreadPlanStepOut.h>
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 |
lldb::StateType | GetPlanRunState () override |
bool | WillStop () override |
bool | MischiefManaged () override |
void | DidPush () override |
bool | IsPlanStale () override |
lldb::ValueObjectSP | GetReturnValueObject () override |
![]() | |
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 () |
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) |
![]() | |
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. | |
![]() | |
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::Flags & | GetFlags () |
const lldb_private::Flags & | GetFlags () 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) |
![]() | |
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) |
virtual lldb::StateType | GetPlanRunState ()=0 |
bool | IsUsuallyUnexplainedStopReason (lldb::StopReason) |
![]() | |
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 ThreadPlanStepOut & | operator= (const ThreadPlanStepOut &)=delete |
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) |
Definition at line 18 of file ThreadPlanStepOut.h.
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.
|
override |
Definition at line 190 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, and lldb_private::Target::RemoveBreakpointByID().
|
privatedelete |
|
private |
Definition at line 503 of file ThreadPlanStepOut.cpp.
References lldb_private::Process::GetABI(), lldb_private::Function::GetCompilerType(), lldb_private::CompilerType::GetFunctionReturnType(), lldb_private::ThreadPlan::GetThread(), m_calculate_return_value, m_immediate_step_from_function, lldb_private::ThreadPlan::m_process, and m_return_valobj_sp.
Referenced by DoPlanExplainsStop(), and ShouldStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 182 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlan::GetThread(), m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, and lldb_private::Thread::QueueThreadPlan().
|
overrideprotectedvirtual |
Implements lldb_private::ThreadPlan.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 269 of file ThreadPlanStepOut.cpp.
References CalculateReturnValue(), lldb::eFrameCompareOlder, lldb::eStopReasonBreakpoint, lldb_private::BreakpointSiteList::FindByID(), lldb_private::Process::GetBreakpointSiteList(), lldb_private::ThreadPlan::GetPrivateStopInfo(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback(), lldb_private::ThreadPlan::IsUsuallyUnexplainedStopReason(), m_immediate_step_from_id, lldb_private::ThreadPlan::m_process, m_return_bp_id, lldb_private::ThreadPlan::m_status, m_step_out_further_plan_sp, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, and lldb_private::ThreadPlan::SetPlanComplete().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::DoPlanExplainsStop().
|
overrideprotectedvirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 392 of file ThreadPlanStepOut.cpp.
References lldb_private::Target::GetBreakpointByID(), lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, and lldb_private::Breakpoint::SetEnabled().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::DoWillResume().
|
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.
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().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 390 of file ThreadPlanStepOut.cpp.
References lldb::eStateRunning.
|
inlineoverridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 39 of file ThreadPlanStepOut.h.
References m_return_valobj_sp.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Definition at line 523 of file ThreadPlanStepOut.cpp.
References lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), and m_step_out_to_id.
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 418 of file ThreadPlanStepOut.cpp.
References lldb_private::GetLog(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::IsPlanComplete(), LLDB_INVALID_BREAK_ID, LLDB_LOGF, m_return_bp_id, lldb_private::ThreadPlan::MischiefManaged(), lldb_private::Target::RemoveBreakpointByID(), and lldb_private::Step.
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::MischiefManaged().
|
privatedelete |
|
protected |
Definition at line 442 of file ThreadPlanStepOut.cpp.
References lldb_private::ThreadPlanStepRange::AddRange(), lldb_private::Block::CalculateSymbolContext(), lldb::eAllThreads, lldb_private::eLazyBoolNo, lldb::eOnlyThisThread, lldb_private::Block::GetContainingInlinedBlock(), lldb_private::StreamString::GetData(), lldb_private::GetLog(), lldb_private::Block::GetNumRanges(), lldb_private::Block::GetRangeAtIndex(), lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetTarget(), lldb_private::ThreadPlan::GetThread(), LLDB_LOGF, m_step_through_inline_plan_sp, m_stop_others, lldb_private::Thread::QueueThreadPlan(), lldb_private::ThreadPlan::SetOkayToDiscard(), lldb_private::Step, lldb_private::SymbolContext::target_sp, and lldb_private::ThreadPlanStepRange::ValidatePlan().
Referenced by ShouldStop(), and ThreadPlanStepOut().
|
inlineoverrideprotectedvirtual |
Implements lldb_private::ThreadPlanShouldStopHere.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 44 of file ThreadPlanStepOut.h.
References lldb_private::ThreadPlanShouldStopHere::GetFlags(), s_default_flag_values, and lldb_private::Flags::Set().
Referenced by ThreadPlanStepOut().
|
private |
Definition at line 162 of file ThreadPlanStepOut.cpp.
References lldb_private::Flags::Clear(), lldb_private::eLazyBoolCalculate, lldb_private::eLazyBoolNo, lldb_private::eLazyBoolYes, lldb_private::ThreadPlanShouldStopHere::eStepOutAvoidNoDebug, lldb_private::ThreadPlanShouldStopHere::GetFlags(), lldb_private::ThreadProperties::GetStepOutAvoidsNoDebug(), lldb_private::ThreadPlan::GetThread(), and lldb_private::Flags::Set().
Referenced by ThreadPlanStepOut().
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 337 of file ThreadPlanStepOut.cpp.
References CalculateReturnValue(), lldb::eFrameCompareOlder, lldb_private::Thread::GetStackFrameAtIndex(), lldb_private::ThreadPlan::GetThread(), lldb_private::ThreadPlanShouldStopHere::InvokeShouldStopHereCallback(), lldb_private::ThreadPlan::IsPlanComplete(), lldb_private::ThreadPlanShouldStopHere::m_flags, lldb_private::ThreadPlan::m_status, m_step_out_further_plan_sp, m_step_out_to_id, m_step_out_to_inline_plan_sp, m_step_through_inline_plan_sp, QueueInlinedStepPlan(), lldb_private::ThreadPlanShouldStopHere::QueueStepOutFromHerePlan(), and lldb_private::ThreadPlan::SetPlanComplete().
Referenced by lldb_private::AppleThreadPlanStepThroughDirectDispatch::ShouldStop().
|
overridevirtual |
Reimplemented from lldb_private::ThreadPlan.
Reimplemented in lldb_private::AppleThreadPlanStepThroughDirectDispatch.
Definition at line 388 of file ThreadPlanStepOut.cpp.
References m_stop_others.
|
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 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.
|
overridevirtual |
Implements lldb_private::ThreadPlan.
Definition at line 408 of file ThreadPlanStepOut.cpp.
References lldb_private::Target::GetBreakpointByID(), lldb_private::ThreadPlan::GetTarget(), LLDB_INVALID_BREAK_ID, m_return_bp_id, and lldb_private::Breakpoint::SetEnabled().
|
friend |
|
private |
Definition at line 74 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue().
|
private |
Definition at line 75 of file ThreadPlanStepOut.h.
Referenced by ThreadPlanStepOut(), and ValidatePlan().
|
private |
Definition at line 71 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), and ThreadPlanStepOut().
|
private |
Definition at line 58 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), and ThreadPlanStepOut().
|
private |
Definition at line 60 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), and ThreadPlanStepOut().
|
private |
Definition at line 59 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), DoWillResume(), GetDescription(), MischiefManaged(), ThreadPlanStepOut(), ValidatePlan(), WillStop(), and ~ThreadPlanStepOut().
|
private |
Definition at line 73 of file ThreadPlanStepOut.h.
Referenced by CalculateReturnValue(), and GetReturnValueObject().
|
private |
Definition at line 56 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), and ThreadPlanStepOut().
|
private |
Definition at line 68 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), and ShouldStop().
|
private |
Definition at line 57 of file ThreadPlanStepOut.h.
Referenced by DoPlanExplainsStop(), IsPlanStale(), ShouldStop(), and ThreadPlanStepOut().
|
private |
Definition at line 62 of file ThreadPlanStepOut.h.
Referenced by DidPush(), DoPlanExplainsStop(), DoWillResume(), GetDescription(), ShouldStop(), ThreadPlanStepOut(), and ValidatePlan().
|
private |
Definition at line 66 of file ThreadPlanStepOut.h.
Referenced by DidPush(), DoPlanExplainsStop(), DoWillResume(), GetDescription(), QueueInlinedStepPlan(), ShouldStop(), and ValidatePlan().
|
private |
Definition at line 72 of file ThreadPlanStepOut.h.
Referenced by GetDescription(), and ThreadPlanStepOut().
|
private |
Definition at line 61 of file ThreadPlanStepOut.h.
Referenced by QueueInlinedStepPlan(), and StopOthers().
|
staticprivate |
Definition at line 53 of file ThreadPlanStepOut.h.
Referenced by SetFlagsToDefault().