LLDB mainline
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 IsSynthetic () 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)
SBStructuredData GetLanguageSpecificData () const
 Language plugins can use this API to report language-specific runtime information about this compile unit, such as additional language version details or feature flags.
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)

Static Protected Member Functions

static SBValue CreateProcessIsRunningExprEvalError ()
 Return an SBValue containing an error message that warns the process is not currently stopped.

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() [2/3]

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

Definition at line 70 of file SBFrame.cpp.

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

◆ ~SBFrame()

◆ SBFrame() [3/3]

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

Definition at line 65 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Member Function Documentation

◆ Clear()

void SBFrame::Clear ( )

Definition at line 360 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA, and m_opaque_sp.

Referenced by ~SBFrame().

◆ CreateProcessIsRunningExprEvalError()

lldb::SBValue SBFrame::CreateProcessIsRunningExprEvalError ( )
staticprotected

Return an SBValue containing an error message that warns the process is not currently stopped.

Definition at line 989 of file SBFrame.cpp.

References lldb_private::ValueObjectConstResult::Create(), error(), lldb_private::Status::FromErrorString(), SBValue, and lldb::SBValue::SetSP().

Referenced by EvaluateExpression(), EvaluateExpression(), EvaluateExpression(), EvaluateExpression(), and lldb_private::lua::SWIGBridge.

◆ Disassemble()

◆ EvaluateExpression() [1/4]

◆ EvaluateExpression() [2/4]

◆ EvaluateExpression() [3/4]

◆ EvaluateExpression() [4/4]

◆ FindRegister()

◆ 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 457 of file SBFrame.cpp.

References lldb_private::API, FindValue(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBValue.

Referenced by FindValue(), and ~SBFrame().

◆ FindValue() [2/2]

◆ 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 414 of file SBFrame.cpp.

References lldb_private::API, FindVariable(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBValue.

Referenced by FindVariable(), and ~SBFrame().

◆ FindVariable() [2/2]

◆ GetBlock()

SBBlock SBFrame::GetBlock ( ) const

Gets the deepest block that contains the frame PC.

See also GetFrameBlock().

Definition at line 196 of file SBFrame.cpp.

References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBBlock.

Referenced by ~SBFrame().

◆ GetCFA()

◆ GetCompileUnit()

◆ GetDescription()

◆ 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 867 of file SBFrame.cpp.

References lldb_private::StackFrame::DumpUsingFormat(), error(), lldb_private::Status::FromError(), lldb::SBFormat::GetFormatEntrySP(), lldb_private::GetStoppedExecutionContext(), m_opaque_sp, and lldb::SBStream::ref().

Referenced by ~SBFrame().

◆ GetDisplayFunctionName()

const char * SBFrame::GetDisplayFunctionName ( )

◆ GetFP()

◆ 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 211 of file SBFrame.cpp.

References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBBlock.

Referenced by ~SBFrame().

◆ GetFrameID()

uint32_t SBFrame::GetFrameID ( ) const

◆ GetFrameSP()

◆ GetFunction()

◆ 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 1153 of file SBFrame.cpp.

References GetFunctionName(), LLDB_INSTRUMENT_VA, and SBFrame().

Referenced by GetFunctionName(), and ~SBFrame().

◆ GetFunctionName() [2/2]

const char * SBFrame::GetFunctionName ( ) const

◆ GetLanguageSpecificData()

SBStructuredData SBFrame::GetLanguageSpecificData ( ) const

Language plugins can use this API to report language-specific runtime information about this compile unit, such as additional language version details or feature flags.

Definition at line 1059 of file SBFrame.cpp.

References lldb_private::API, lldb_private::StackFrame::GetLanguageSpecificData(), lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, lldb::SBStructuredData::m_impl_up, and m_opaque_sp.

Referenced by ~SBFrame().

◆ GetLineEntry()

◆ GetModule()

◆ GetPC()

◆ GetPCAddress()

◆ GetRegisters()

◆ GetSP()

◆ GetSymbol()

◆ GetSymbolContext()

SBSymbolContext SBFrame::GetSymbolContext ( uint32_t resolve_scope) const

◆ GetThread()

◆ GetValueForVariablePath() [1/2]

◆ 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 366 of file SBFrame.cpp.

References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), GetValueForVariablePath(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, m_opaque_sp, and SBValue.

◆ GetVariables() [1/3]

◆ GetVariables() [2/3]

◆ GetVariables() [3/3]

◆ GuessLanguage()

◆ IsArtificial() [1/2]

bool SBFrame::IsArtificial ( )

Definition at line 1099 of file SBFrame.cpp.

References IsArtificial(), LLDB_INSTRUMENT_VA, and SBFrame().

Referenced by IsArtificial(), and ~SBFrame().

◆ IsArtificial() [2/2]

◆ IsEqual()

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

Definition at line 591 of file SBFrame.cpp.

References GetFrameSP(), LLDB_INSTRUMENT_VA, and SBFrame().

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

◆ IsHidden()

bool SBFrame::IsHidden ( ) const

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

Definition at line 1137 of file SBFrame.cpp.

References lldb_private::API, lldb_private::GetLog(), lldb_private::GetStoppedExecutionContext(), LLDB_INSTRUMENT_VA, LLDB_LOG_ERROR, and m_opaque_sp.

Referenced by ~SBFrame().

◆ IsInlined() [1/2]

bool SBFrame::IsInlined ( )

Return true if this frame represents an inlined function.

See also GetFunctionName().

Definition at line 1078 of file SBFrame.cpp.

References IsInlined(), LLDB_INSTRUMENT_VA, and SBFrame().

Referenced by IsInlined(), and ~SBFrame().

◆ IsInlined() [2/2]

◆ IsSynthetic()

bool SBFrame::IsSynthetic ( ) const

◆ IsValid()

bool SBFrame::IsValid ( ) const

Definition at line 94 of file SBFrame.cpp.

References LLDB_INSTRUMENT_VA.

Referenced by lldb::SBThread::StepOutOfFrame(), and ~SBFrame().

◆ operator bool()

◆ operator!=()

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

Definition at line 605 of file SBFrame.cpp.

References IsEqual(), LLDB_INSTRUMENT_VA, and SBFrame().

Referenced by ~SBFrame().

◆ operator=()

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

Definition at line 78 of file SBFrame.cpp.

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

◆ operator==()

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

Definition at line 599 of file SBFrame.cpp.

References IsEqual(), LLDB_INSTRUMENT_VA, and SBFrame().

Referenced by ~SBFrame().

◆ SetFrameSP()

◆ SetPC()

◆ lldb_private::lua::SWIGBridge

◆ lldb_private::python::SWIGBridge

friend class lldb_private::python::SWIGBridge
friend

Definition at line 229 of file SBFrame.h.

◆ SBBlock

friend class SBBlock
friend

Definition at line 223 of file SBFrame.h.

References SBBlock.

Referenced by GetBlock(), GetFrameBlock(), and SBBlock.

◆ SBExecutionContext

friend class SBExecutionContext
friend

Definition at line 224 of file SBFrame.h.

References SBExecutionContext.

Referenced by SBExecutionContext.

◆ SBInstruction

friend class SBInstruction
friend

Definition at line 225 of file SBFrame.h.

References SBInstruction.

Referenced by SBInstruction.

◆ SBThread

friend class SBThread
friend

Definition at line 226 of file SBFrame.h.

References SBThread.

Referenced by GetThread(), and SBThread.

◆ SBValue

Member Data Documentation

◆ m_opaque_sp


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