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

#include <SBFrame.h>

Collaboration diagram for lldb::SBFrame:
Collaboration graph
[legend]

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. More...
 
const char * GetFunctionName ()
 Get the appropriate function name for this frame. More...
 
const char * GetDisplayFunctionName ()
 
const char * GetFunctionName () const
 
lldb::LanguageType GuessLanguage () const
 
bool IsInlined ()
 Return true if this frame represents an inlined function. More...
 
bool IsInlined () const
 
bool IsArtificial ()
 
bool IsArtificial () const
 
lldb::SBValue EvaluateExpression (const char *expr)
 The version that doesn't supply a 'use_dynamic' value will use the target's default. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
lldb::SBValue FindValue (const char *name, ValueType value_type)
 Find variables, register sets, registers, or persistent variables using the frame as the scope. More...
 
lldb::SBValue FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic)
 
bool GetDescription (lldb::SBStream &description)
 
 SBFrame (const lldb::StackFrameSP &lldb_object_sp)
 

Protected Member Functions

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
 

Detailed Description

Definition at line 17 of file SBFrame.h.

Constructor & Destructor Documentation

◆ SBFrame() [1/3]

SBFrame::SBFrame ( )

Definition at line 57 of file SBFrame.cpp.

References LLDB_RECORD_CONSTRUCTOR, LLDB_RECORD_CONSTRUCTOR_NO_ARGS, and m_opaque_sp.

◆ SBFrame() [2/3]

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

Definition at line 67 of file SBFrame.cpp.

References lldb_private::clone(), LLDB_RECORD_CONSTRUCTOR, m_opaque_sp, and ~SBFrame().

◆ ~SBFrame()

SBFrame::~SBFrame ( )
default

Referenced by SBFrame().

◆ SBFrame() [3/3]

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

Member Function Documentation

◆ Clear()

void SBFrame::Clear ( )

◆ Disassemble()

const char * SBFrame::Disassemble ( ) const

◆ EvaluateExpression() [1/4]

SBValue SBFrame::EvaluateExpression ( const char *  expr)

◆ EvaluateExpression() [2/4]

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

◆ EvaluateExpression() [3/4]

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

◆ EvaluateExpression() [4/4]

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

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

References lldb_private::Target::CalculateTarget(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and m_opaque_sp.

Referenced by FindValue(), and lldb_private::repro::RegisterMethods< SBFrame >().

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

References lldb_private::Target::CalculateTarget(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and m_opaque_sp.

Referenced by FindVariable(), and lldb_private::repro::RegisterMethods< SBFrame >().

◆ 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)

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

References lldb_private::Process::GetRunLock(), LLDB_RECORD_METHOD_CONST_NO_ARGS, LLDB_RECORD_RESULT, m_opaque_sp, and lldb_private::ProcessRunLock::ProcessRunLocker::TryLock().

Referenced by lldb_private::repro::RegisterMethods< SBFrame >().

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

References LLDB_RECORD_METHOD_NO_ARGS.

Referenced by GetFunctionName(), and lldb_private::repro::RegisterMethods< SBFrame >().

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

References lldb_private::Target::CalculateTarget(), GetValueForVariablePath(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, 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 ( )

◆ IsArtificial() [2/2]

bool SBFrame::IsArtificial ( ) const

◆ IsEqual()

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

◆ IsInlined() [1/2]

bool SBFrame::IsInlined ( )

Return true if this frame represents an inlined function.

See also GetFunctionName().

Definition at line 1131 of file SBFrame.cpp.

References LLDB_RECORD_METHOD_NO_ARGS.

Referenced by IsInlined(), and lldb_private::repro::RegisterMethods< SBFrame >().

◆ IsInlined() [2/2]

bool SBFrame::IsInlined ( ) const

◆ IsValid()

bool SBFrame::IsValid ( ) const

◆ operator bool()

SBFrame::operator bool ( ) const
explicit

◆ operator!=()

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

Definition at line 709 of file SBFrame.cpp.

References IsEqual(), and LLDB_RECORD_METHOD_CONST.

◆ operator=()

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

Definition at line 75 of file SBFrame.cpp.

References lldb_private::clone(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and m_opaque_sp.

◆ operator==()

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

Definition at line 702 of file SBFrame.cpp.

References IsEqual(), and LLDB_RECORD_METHOD_CONST.

◆ 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

◆ SBBlock

friend class SBBlock
friend

Definition at line 190 of file SBFrame.h.

◆ SBExecutionContext

friend class SBExecutionContext
friend

Definition at line 191 of file SBFrame.h.

◆ SBInstruction

friend class SBInstruction
friend

Definition at line 192 of file SBFrame.h.

◆ SBThread

friend class SBThread
friend

Definition at line 193 of file SBFrame.h.

◆ SBValue

friend class SBValue
friend

Definition at line 194 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: