LLDB mainline
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
lldb::SBFrame Class Reference

#include <SBFrame.h>

Public Member Functions

 SBFrame ()
 
 SBFrame (const lldb::SBFrame &rhs)
 
const lldb::SBFrameoperator= (const lldb::SBFrame &rhs)
 
 ~SBFrame ()
 
bool IsEqual (const lldb::SBFrame &that) const
 
 operator bool () const
 
bool IsValid () const
 
uint32_t GetFrameID () const
 
lldb::addr_t GetCFA () const
 
lldb::addr_t GetPC () const
 
bool SetPC (lldb::addr_t new_pc)
 
lldb::addr_t GetSP () const
 
lldb::addr_t GetFP () const
 
lldb::SBAddress GetPCAddress () const
 
lldb::SBSymbolContext GetSymbolContext (uint32_t resolve_scope) const
 
lldb::SBModule GetModule () const
 
lldb::SBCompileUnit GetCompileUnit () const
 
lldb::SBFunction GetFunction () const
 
lldb::SBSymbol GetSymbol () const
 
lldb::SBBlock GetBlock () const
 Gets the deepest block that contains the frame PC.
 
const char * GetFunctionName ()
 Get the appropriate function name for this frame.
 
const char * GetDisplayFunctionName ()
 
const char * GetFunctionName () const
 
lldb::LanguageType GuessLanguage () const
 
bool IsInlined ()
 Return true if this frame represents an inlined function.
 
bool IsInlined () const
 
bool IsArtificial ()
 
bool IsArtificial () const
 
bool IsHidden () const
 Return whether a frame recognizer decided this frame should not be displayes in backtraces etc.
 
lldb::SBValue EvaluateExpression (const char *expr)
 The version that doesn't supply a 'use_dynamic' value will use the target's default.
 
lldb::SBValue EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic)
 
lldb::SBValue EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error)
 
lldb::SBValue EvaluateExpression (const char *expr, const SBExpressionOptions &options)
 
lldb::SBBlock GetFrameBlock () const
 Gets the lexical block that defines the stack frame.
 
lldb::SBLineEntry GetLineEntry () const
 
lldb::SBThread GetThread () const
 
const char * Disassemble () const
 
void Clear ()
 
bool operator== (const lldb::SBFrame &rhs) const
 
bool operator!= (const lldb::SBFrame &rhs) const
 
lldb::SBValueList GetVariables (bool arguments, bool locals, bool statics, bool in_scope_only)
 The version that doesn't supply a 'use_dynamic' value will use the target's default.
 
lldb::SBValueList GetVariables (bool arguments, bool locals, bool statics, bool in_scope_only, lldb::DynamicValueType use_dynamic)
 
lldb::SBValueList GetVariables (const lldb::SBVariablesOptions &options)
 
lldb::SBValueList GetRegisters ()
 
lldb::SBValue FindRegister (const char *name)
 
lldb::SBValue FindVariable (const char *var_name)
 The version that doesn't supply a 'use_dynamic' value will use the target's default.
 
lldb::SBValue FindVariable (const char *var_name, lldb::DynamicValueType use_dynamic)
 
lldb::SBValue GetValueForVariablePath (const char *var_expr_cstr, DynamicValueType use_dynamic)
 
lldb::SBValue GetValueForVariablePath (const char *var_path)
 The version that doesn't supply a 'use_dynamic' value will use the target's default.
 
lldb::SBValue FindValue (const char *name, ValueType value_type)
 Find variables, register sets, registers, or persistent variables using the frame as the scope.
 
lldb::SBValue FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic)
 
bool GetDescription (lldb::SBStream &description)
 
SBError GetDescriptionWithFormat (const SBFormat &format, SBStream &output)
 Similar to GetDescription() but the format of the description can be configured via the format parameter.
 

Protected Member Functions

 SBFrame (const lldb::StackFrameSP &lldb_object_sp)
 
lldb::StackFrameSP GetFrameSP () const
 
void SetFrameSP (const lldb::StackFrameSP &lldb_object_sp)
 

Protected Attributes

lldb::ExecutionContextRefSP m_opaque_sp
 

Friends

class SBBlock
 
class SBExecutionContext
 
class SBInstruction
 
class SBThread
 
class SBValue
 
class lldb_private::python::SWIGBridge
 
class lldb_private::lua::SWIGBridge
 

Detailed Description

Definition at line 26 of file SBFrame.h.

Constructor & Destructor Documentation

◆ SBFrame() [1/3]

SBFrame::SBFrame ( )

Definition at line 60 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA.

◆ SBFrame() [2/3]

SBFrame::SBFrame ( const lldb::SBFrame rhs)

Definition at line 69 of file SBFrame.cpp.

References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ ~SBFrame()

SBFrame::~SBFrame ( )
default

References lldb::operator==().

◆ SBFrame() [3/3]

SBFrame::SBFrame ( const lldb::StackFrameSP lldb_object_sp)
protected

Definition at line 64 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA.

Member Function Documentation

◆ Clear()

void SBFrame::Clear ( )

Definition at line 437 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ Disassemble()

const char * SBFrame::Disassemble ( ) const

◆ EvaluateExpression() [1/4]

SBValue SBFrame::EvaluateExpression ( const char *  expr)

◆ EvaluateExpression() [2/4]

lldb::SBValue SBFrame::EvaluateExpression ( const char *  expr,
const SBExpressionOptions options 
)

◆ EvaluateExpression() [3/4]

SBValue SBFrame::EvaluateExpression ( const char *  expr,
lldb::DynamicValueType  use_dynamic 
)

◆ EvaluateExpression() [4/4]

SBValue SBFrame::EvaluateExpression ( const char *  expr,
lldb::DynamicValueType  use_dynamic,
bool  unwind_on_error 
)

◆ FindRegister()

SBValue SBFrame::FindRegister ( const char *  name)

◆ FindValue() [1/2]

SBValue SBFrame::FindValue ( const char *  name,
ValueType  value_type 
)

Find variables, register sets, registers, or persistent variables using the frame as the scope.

NB. This function does not look up ivars in the function object pointer. To do that use GetValueForVariablePath.

The version that doesn't supply a 'use_dynamic' value will use the target's default.

Definition at line 545 of file SBFrame.cpp.

References lldb_private::StackFrame::CalculateTarget(), FindValue(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContext::GetTargetPtr(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by FindValue().

◆ FindValue() [2/2]

SBValue SBFrame::FindValue ( const char *  name,
ValueType  value_type,
lldb::DynamicValueType  use_dynamic 
)

◆ FindVariable() [1/2]

SBValue SBFrame::FindVariable ( const char *  var_name)

The version that doesn't supply a 'use_dynamic' value will use the target's default.

Definition at line 494 of file SBFrame.cpp.

References lldb_private::StackFrame::CalculateTarget(), FindVariable(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContext::GetTargetPtr(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by FindVariable().

◆ FindVariable() [2/2]

SBValue SBFrame::FindVariable ( const char *  var_name,
lldb::DynamicValueType  use_dynamic 
)

◆ GetBlock()

SBBlock SBFrame::GetBlock ( ) const

◆ GetCFA()

lldb::addr_t SBFrame::GetCFA ( ) const

◆ GetCompileUnit()

SBCompileUnit SBFrame::GetCompileUnit ( ) const

◆ GetDescription()

bool SBFrame::GetDescription ( lldb::SBStream description)

◆ GetDescriptionWithFormat()

SBError SBFrame::GetDescriptionWithFormat ( const SBFormat format,
SBStream output 
)

Similar to GetDescription() but the format of the description can be configured via the format parameter.

See https://lldb.llvm.org/use/formatting.html for more information on format strings.

Parameters
[in]formatThe format to use for generating the description.
[out]outputThe stream where the description will be written to.
Returns
An error object with an error message in case of failures.

Definition at line 951 of file SBFrame.cpp.

References lldb_private::StackFrame::DumpUsingFormat(), error(), lldb::SBFormat::GetFormatEntrySP(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetTargetPtr(), m_opaque_sp, lldb::SBStream::ref(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().

◆ GetDisplayFunctionName()

const char * SBFrame::GetDisplayFunctionName ( )

◆ GetFP()

addr_t SBFrame::GetFP ( ) const

◆ GetFrameBlock()

SBBlock SBFrame::GetFrameBlock ( ) const

Gets the lexical block that defines the stack frame.

Another way to think of this is it will return the block that contains all of the variables for a stack frame. Inlined functions are represented as SBBlock objects that have inlined function information: the name of the inlined function, where it was called from. The block that is returned will be the first block at or above the block for the PC (SBFrame::GetBlock()) that defines the scope of the frame. When a function contains no inlined functions, this will be the top most lexical block that defines the function. When a function has inlined functions and the PC is currently in one of those inlined functions, this method will return the inlined block that defines this frame. If the PC isn't currently in an inlined function, the lexical block that defines the function is returned.

Definition at line 252 of file SBFrame.cpp.

References lldb_private::StackFrame::GetFrameBlock(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContext::GetProcessPtr(), lldb_private::Process::GetRunLock(), lldb_private::ExecutionContext::GetTargetPtr(), LLDB_INSTRUMENT_VA, m_opaque_sp, lldb::SBBlock::SetPtr(), and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().

◆ GetFrameID()

uint32_t SBFrame::GetFrameID ( ) const

◆ GetFrameSP()

StackFrameSP SBFrame::GetFrameSP ( ) const
protected

◆ GetFunction()

SBFunction SBFrame::GetFunction ( ) const

◆ GetFunctionName() [1/2]

const char * SBFrame::GetFunctionName ( )

Get the appropriate function name for this frame.

Inlined functions in LLDB are represented by Blocks that have inlined function information, so just looking at the SBFunction or SBSymbol for a frame isn't enough. This function will return the appropriate function, symbol or inlined function name for the frame.

This function returns:

  • the name of the inlined function (if there is one)
  • the name of the concrete function (if there is one)
  • the name of the symbol (if there is one)
  • NULL

See also IsInlined().

Definition at line 1216 of file SBFrame.cpp.

References GetFunctionName(), and LLDB_INSTRUMENT_VA.

Referenced by GetFunctionName().

◆ GetFunctionName() [2/2]

const char * SBFrame::GetFunctionName ( ) const

◆ GetLineEntry()

SBLineEntry SBFrame::GetLineEntry ( ) const

◆ GetModule()

SBModule SBFrame::GetModule ( ) const

◆ GetPC()

addr_t SBFrame::GetPC ( ) const

◆ GetPCAddress()

SBAddress SBFrame::GetPCAddress ( ) const

◆ GetRegisters()

SBValueList SBFrame::GetRegisters ( )

◆ GetSP()

addr_t SBFrame::GetSP ( ) const

◆ GetSymbol()

SBSymbol SBFrame::GetSymbol ( ) const

◆ GetSymbolContext()

SBSymbolContext SBFrame::GetSymbolContext ( uint32_t  resolve_scope) const

◆ GetThread()

SBThread SBFrame::GetThread ( ) const

◆ GetValueForVariablePath() [1/2]

lldb::SBValue SBFrame::GetValueForVariablePath ( const char *  var_expr_cstr,
DynamicValueType  use_dynamic 
)

◆ GetValueForVariablePath() [2/2]

lldb::SBValue SBFrame::GetValueForVariablePath ( const char *  var_path)

The version that doesn't supply a 'use_dynamic' value will use the target's default.

Definition at line 443 of file SBFrame.cpp.

References lldb_private::StackFrame::CalculateTarget(), lldb_private::ExecutionContext::GetFramePtr(), lldb_private::ExecutionContext::GetTargetPtr(), GetValueForVariablePath(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ GetVariables() [1/3]

SBValueList SBFrame::GetVariables ( bool  arguments,
bool  locals,
bool  statics,
bool  in_scope_only 
)

◆ GetVariables() [2/3]

lldb::SBValueList SBFrame::GetVariables ( bool  arguments,
bool  locals,
bool  statics,
bool  in_scope_only,
lldb::DynamicValueType  use_dynamic 
)

◆ GetVariables() [3/3]

SBValueList SBFrame::GetVariables ( const lldb::SBVariablesOptions options)

◆ GuessLanguage()

lldb::LanguageType SBFrame::GuessLanguage ( ) const

◆ IsArtificial() [1/2]

bool SBFrame::IsArtificial ( )

Definition at line 1186 of file SBFrame.cpp.

References IsArtificial(), and LLDB_INSTRUMENT_VA.

Referenced by IsArtificial().

◆ IsArtificial() [2/2]

bool SBFrame::IsArtificial ( ) const

◆ IsEqual()

bool SBFrame::IsEqual ( const lldb::SBFrame that) const

Definition at line 677 of file SBFrame.cpp.

References GetFrameSP(), and LLDB_INSTRUMENT_VA.

Referenced by operator!=(), and operator==().

◆ IsHidden()

bool SBFrame::IsHidden ( ) const

Return whether a frame recognizer decided this frame should not be displayes in backtraces etc.

Definition at line 1204 of file SBFrame.cpp.

References lldb_private::ExecutionContext::GetFramePtr(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ IsInlined() [1/2]

bool SBFrame::IsInlined ( )

Return true if this frame represents an inlined function.

See also GetFunctionName().

Definition at line 1156 of file SBFrame.cpp.

References IsInlined(), and LLDB_INSTRUMENT_VA.

Referenced by IsInlined().

◆ IsInlined() [2/2]

bool SBFrame::IsInlined ( ) const

◆ IsValid()

bool SBFrame::IsValid ( ) const

Definition at line 93 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by lldb::SBThread::StepOutOfFrame().

◆ operator bool()

SBFrame::operator bool ( ) const
explicit

◆ operator!=()

bool SBFrame::operator!= ( const lldb::SBFrame rhs) const

Definition at line 691 of file SBFrame.cpp.

References IsEqual(), and LLDB_INSTRUMENT_VA.

◆ operator=()

const SBFrame & SBFrame::operator= ( const lldb::SBFrame rhs)

Definition at line 77 of file SBFrame.cpp.

References lldb_private::clone(), LLDB_INSTRUMENT_VA, and m_opaque_sp.

◆ operator==()

bool SBFrame::operator== ( const lldb::SBFrame rhs) const

Definition at line 685 of file SBFrame.cpp.

References IsEqual(), and LLDB_INSTRUMENT_VA.

◆ SetFrameSP()

void SBFrame::SetFrameSP ( const lldb::StackFrameSP lldb_object_sp)
protected

◆ SetPC()

bool SBFrame::SetPC ( lldb::addr_t  new_pc)

Friends And Related Function Documentation

◆ lldb_private::lua::SWIGBridge

friend class lldb_private::lua::SWIGBridge
friend

Definition at line 223 of file SBFrame.h.

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 222 of file SBFrame.h.

◆ SBBlock

friend class SBBlock
friend

Definition at line 216 of file SBFrame.h.

◆ SBExecutionContext

friend class SBExecutionContext
friend

Definition at line 217 of file SBFrame.h.

◆ SBInstruction

friend class SBInstruction
friend

Definition at line 218 of file SBFrame.h.

◆ SBThread

friend class SBThread
friend

Definition at line 219 of file SBFrame.h.

◆ SBValue

friend class SBValue
friend

Definition at line 220 of file SBFrame.h.

Member Data Documentation

◆ m_opaque_sp

lldb::ExecutionContextRefSP lldb::SBFrame::m_opaque_sp
protected

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