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

#include <StopInfo.h>

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

Public Member Functions

 StopInfo (Thread &thread, uint64_t value)
 
virtual ~StopInfo ()=default
 
bool IsValid () const
 
void SetThread (const lldb::ThreadSP &thread_sp)
 
lldb::ThreadSP GetThread () const
 
uint64_t GetValue () const
 
virtual lldb::StopReason GetStopReason () const =0
 
virtual bool ShouldStopSynchronous (Event *event_ptr)
 
void OverrideShouldNotify (bool override_value)
 
virtual bool ShouldNotify (Event *event_ptr)
 
virtual void WillResume (lldb::StateType resume_state)
 
virtual const char * GetDescription ()
 
virtual void SetDescription (const char *desc_cstr)
 
virtual std::optional< uint32_t > GetSuggestedStackFrameIndex (bool inlined_stack)
 This gives the StopInfo a chance to suggest a stack frame to select.
 
virtual bool IsValidForOperatingSystemThread (Thread &thread)
 
virtual bool WasContinueInterrupted (Thread &thread)
 A Continue operation can result in a false stop event before any execution has happened.
 
void OverrideShouldStop (bool override_value)
 
bool GetOverrideShouldStop ()
 
bool GetOverriddenShouldStopValue ()
 
StructuredData::ObjectSP GetExtendedInfo ()
 

Static Public Member Functions

static lldb::StopInfoSP CreateStopReasonWithBreakpointSiteID (Thread &thread, lldb::break_id_t break_id)
 
static lldb::StopInfoSP CreateStopReasonWithBreakpointSiteID (Thread &thread, lldb::break_id_t break_id, bool should_stop)
 
static lldb::StopInfoSP CreateStopReasonWithWatchpointID (Thread &thread, lldb::break_id_t watch_id, bool silently_continue=false)
 
static lldb::StopInfoSP CreateStopReasonWithSignal (Thread &thread, int signo, const char *description=nullptr, std::optional< int > code=std::nullopt)
 
static lldb::StopInfoSP CreateStopReasonWithInterrupt (Thread &thread, int signo, const char *description)
 
static lldb::StopInfoSP CreateStopReasonToTrace (Thread &thread)
 
static lldb::StopInfoSP CreateStopReasonWithPlan (lldb::ThreadPlanSP &plan, lldb::ValueObjectSP return_valobj_sp, lldb::ExpressionVariableSP expression_variable_sp)
 
static lldb::StopInfoSP CreateStopReasonWithException (Thread &thread, const char *description)
 
static lldb::StopInfoSP CreateStopReasonWithExec (Thread &thread)
 
static lldb::StopInfoSP CreateStopReasonProcessorTrace (Thread &thread, const char *description)
 
static lldb::StopInfoSP CreateStopReasonFork (Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
 
static lldb::StopInfoSP CreateStopReasonVFork (Thread &thread, lldb::pid_t child_pid, lldb::tid_t child_tid)
 
static lldb::StopInfoSP CreateStopReasonVForkDone (Thread &thread)
 
static lldb::ValueObjectSP GetReturnValueObject (lldb::StopInfoSP &stop_info_sp)
 
static lldb::ExpressionVariableSP GetExpressionVariable (lldb::StopInfoSP &stop_info_sp)
 
static lldb::ValueObjectSP GetCrashingDereference (lldb::StopInfoSP &stop_info_sp, lldb::addr_t *crashing_address=nullptr)
 

Protected Member Functions

virtual void PerformAction (Event *event_ptr)
 
virtual bool DoShouldNotify (Event *event_ptr)
 
virtual bool ShouldStop (Event *event_ptr)
 
bool HasTargetRunSinceMe ()
 
void MakeStopInfoValid ()
 

Protected Attributes

lldb::ThreadWP m_thread_wp
 
uint32_t m_stop_id
 
uint32_t m_resume_id
 
uint64_t m_value
 
std::string m_description
 
LazyBool m_override_should_notify
 
LazyBool m_override_should_stop
 
StructuredData::ObjectSP m_extended_info
 

Private Member Functions

 StopInfo (const StopInfo &)=delete
 
const StopInfooperator= (const StopInfo &)=delete
 

Friends

class Process::ProcessEventData
 
class ThreadPlanBase
 
class Thread
 

Detailed Description

Definition at line 20 of file StopInfo.h.

Constructor & Destructor Documentation

◆ StopInfo() [1/2]

StopInfo::StopInfo ( Thread thread,
uint64_t  value 
)

Definition at line 34 of file StopInfo.cpp.

◆ ~StopInfo()

virtual lldb_private::StopInfo::~StopInfo ( )
virtualdefault

◆ StopInfo() [2/2]

lldb_private::StopInfo::StopInfo ( const StopInfo )
privatedelete

Member Function Documentation

◆ CreateStopReasonFork()

StopInfoSP StopInfo::CreateStopReasonFork ( Thread thread,
lldb::pid_t  child_pid,
lldb::tid_t  child_tid 
)
static

◆ CreateStopReasonProcessorTrace()

StopInfoSP StopInfo::CreateStopReasonProcessorTrace ( Thread thread,
const char *  description 
)
static

◆ CreateStopReasonToTrace()

StopInfoSP StopInfo::CreateStopReasonToTrace ( Thread thread)
static

◆ CreateStopReasonVFork()

StopInfoSP StopInfo::CreateStopReasonVFork ( Thread thread,
lldb::pid_t  child_pid,
lldb::tid_t  child_tid 
)
static

◆ CreateStopReasonVForkDone()

StopInfoSP StopInfo::CreateStopReasonVForkDone ( Thread thread)
static

◆ CreateStopReasonWithBreakpointSiteID() [1/2]

static lldb::StopInfoSP lldb_private::StopInfo::CreateStopReasonWithBreakpointSiteID ( Thread thread,
lldb::break_id_t  break_id 
)
static

◆ CreateStopReasonWithBreakpointSiteID() [2/2]

static lldb::StopInfoSP lldb_private::StopInfo::CreateStopReasonWithBreakpointSiteID ( Thread thread,
lldb::break_id_t  break_id,
bool  should_stop 
)
static

◆ CreateStopReasonWithException()

StopInfoSP StopInfo::CreateStopReasonWithException ( Thread thread,
const char *  description 
)
static

◆ CreateStopReasonWithExec()

StopInfoSP StopInfo::CreateStopReasonWithExec ( Thread thread)
static

◆ CreateStopReasonWithInterrupt()

StopInfoSP StopInfo::CreateStopReasonWithInterrupt ( Thread thread,
int  signo,
const char *  description 
)
static

◆ CreateStopReasonWithPlan()

StopInfoSP StopInfo::CreateStopReasonWithPlan ( lldb::ThreadPlanSP plan,
lldb::ValueObjectSP  return_valobj_sp,
lldb::ExpressionVariableSP  expression_variable_sp 
)
static

Definition at line 1482 of file StopInfo.cpp.

Referenced by lldb_private::Thread::GetStopInfo().

◆ CreateStopReasonWithSignal()

StopInfoSP StopInfo::CreateStopReasonWithSignal ( Thread thread,
int  signo,
const char *  description = nullptr,
std::optional< int >  code = std::nullopt 
)
static

◆ CreateStopReasonWithWatchpointID()

StopInfoSP StopInfo::CreateStopReasonWithWatchpointID ( Thread thread,
lldb::break_id_t  watch_id,
bool  silently_continue = false 
)
static

◆ DoShouldNotify()

virtual bool lldb_private::StopInfo::DoShouldNotify ( Event event_ptr)
inlineprotectedvirtual

◆ GetCrashingDereference()

lldb::ValueObjectSP StopInfo::GetCrashingDereference ( lldb::StopInfoSP stop_info_sp,
lldb::addr_t crashing_address = nullptr 
)
static

◆ GetDescription()

virtual const char * lldb_private::StopInfo::GetDescription ( )
inlinevirtual

◆ GetExpressionVariable()

ExpressionVariableSP StopInfo::GetExpressionVariable ( lldb::StopInfoSP stop_info_sp)
static

◆ GetExtendedInfo()

StructuredData::ObjectSP lldb_private::StopInfo::GetExtendedInfo ( )
inline

Definition at line 118 of file StopInfo.h.

References m_extended_info.

◆ GetOverriddenShouldStopValue()

bool lldb_private::StopInfo::GetOverriddenShouldStopValue ( )
inline

Definition at line 114 of file StopInfo.h.

References lldb_private::eLazyBoolYes, and m_override_should_stop.

◆ GetOverrideShouldStop()

bool lldb_private::StopInfo::GetOverrideShouldStop ( )
inline

Definition at line 110 of file StopInfo.h.

References lldb_private::eLazyBoolCalculate, and m_override_should_stop.

◆ GetReturnValueObject()

ValueObjectSP StopInfo::GetReturnValueObject ( lldb::StopInfoSP stop_info_sp)
static

◆ GetStopReason()

virtual lldb::StopReason lldb_private::StopInfo::GetStopReason ( ) const
pure virtual

◆ GetSuggestedStackFrameIndex()

virtual std::optional< uint32_t > lldb_private::StopInfo::GetSuggestedStackFrameIndex ( bool  inlined_stack)
inlinevirtual

This gives the StopInfo a chance to suggest a stack frame to select.

Passing true for inlined_stack will request changes to the inlined call stack. Passing false will request changes to the real stack frame. The inlined stack gets adjusted before we call into the thread plans so they can reason based on the correct values. The real stack adjustment is handled after the frame recognizers get a chance to adjust the frame.

Reimplemented in lldb_private::StopInfoBreakpoint, and lldb_private::StopInfoTrace.

Definition at line 88 of file StopInfo.h.

◆ GetThread()

lldb::ThreadSP lldb_private::StopInfo::GetThread ( ) const
inline

◆ GetValue()

uint64_t lldb_private::StopInfo::GetValue ( ) const
inline

◆ HasTargetRunSinceMe()

bool StopInfo::HasTargetRunSinceMe ( )
protected

◆ IsValid()

bool StopInfo::IsValid ( ) const

Definition at line 41 of file StopInfo.cpp.

References m_stop_id, and m_thread_wp.

◆ IsValidForOperatingSystemThread()

virtual bool lldb_private::StopInfo::IsValidForOperatingSystemThread ( Thread thread)
inlinevirtual

Reimplemented in lldb_private::StopInfoBreakpoint.

Definition at line 92 of file StopInfo.h.

◆ MakeStopInfoValid()

void StopInfo::MakeStopInfoValid ( )
protected

Definition at line 48 of file StopInfo.cpp.

References m_resume_id, m_stop_id, and m_thread_wp.

◆ operator=()

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

◆ OverrideShouldNotify()

void lldb_private::StopInfo::OverrideShouldNotify ( bool  override_value)
inline

◆ OverrideShouldStop()

void lldb_private::StopInfo::OverrideShouldStop ( bool  override_value)
inline

◆ PerformAction()

virtual void lldb_private::StopInfo::PerformAction ( Event event_ptr)
inlineprotectedvirtual

◆ SetDescription()

virtual void lldb_private::StopInfo::SetDescription ( const char *  desc_cstr)
inlinevirtual

◆ SetThread()

void lldb_private::StopInfo::SetThread ( const lldb::ThreadSP thread_sp)
inline

Definition at line 32 of file StopInfo.h.

References m_thread_wp.

◆ ShouldNotify()

virtual bool lldb_private::StopInfo::ShouldNotify ( Event event_ptr)
inlinevirtual

◆ ShouldStop()

virtual bool lldb_private::StopInfo::ShouldStop ( Event event_ptr)
inlineprotectedvirtual

◆ ShouldStopSynchronous()

virtual bool lldb_private::StopInfo::ShouldStopSynchronous ( Event event_ptr)
inlinevirtual

◆ WasContinueInterrupted()

virtual bool lldb_private::StopInfo::WasContinueInterrupted ( Thread thread)
inlinevirtual

A Continue operation can result in a false stop event before any execution has happened.

We need to detect this and silently continue again one more time.

Reimplemented in lldb_private::StopInfoMachException.

Definition at line 97 of file StopInfo.h.

◆ WillResume()

virtual void lldb_private::StopInfo::WillResume ( lldb::StateType  resume_state)
inlinevirtual

Reimplemented in lldb_private::StopInfoUnixSignal.

Definition at line 67 of file StopInfo.h.

Referenced by lldb_private::Thread::ShouldResume().

Friends And Related Function Documentation

◆ Process::ProcessEventData

friend class Process::ProcessEventData
friend

Definition at line 21 of file StopInfo.h.

◆ Thread

friend class Thread
friend

Definition at line 219 of file StopInfo.h.

◆ ThreadPlanBase

friend class ThreadPlanBase
friend

Definition at line 22 of file StopInfo.h.

Member Data Documentation

◆ m_description

std::string lldb_private::StopInfo::m_description
protected

◆ m_extended_info

StructuredData::ObjectSP lldb_private::StopInfo::m_extended_info
protected

◆ m_override_should_notify

LazyBool lldb_private::StopInfo::m_override_should_notify
protected

Definition at line 202 of file StopInfo.h.

Referenced by OverrideShouldNotify(), and ShouldNotify().

◆ m_override_should_stop

LazyBool lldb_private::StopInfo::m_override_should_stop
protected

◆ m_resume_id

uint32_t lldb_private::StopInfo::m_resume_id
protected

Definition at line 198 of file StopInfo.h.

Referenced by HasTargetRunSinceMe(), and MakeStopInfoValid().

◆ m_stop_id

uint32_t lldb_private::StopInfo::m_stop_id
protected

Definition at line 197 of file StopInfo.h.

Referenced by IsValid(), and MakeStopInfoValid().

◆ m_thread_wp

lldb::ThreadWP lldb_private::StopInfo::m_thread_wp
protected

◆ m_value

uint64_t lldb_private::StopInfo::m_value
protected

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