LLDB mainline
lldb_private::BorrowedStackFrame Class Reference

"lldb/Target/BorrowedStackFrame.h" More...

#include <BorrowedStackFrame.h>

Inheritance diagram for lldb_private::BorrowedStackFrame:
[legend]

Public Member Functions

 BorrowedStackFrame (lldb::StackFrameSP borrowed_frame_sp, uint32_t new_frame_index, std::optional< uint32_t > new_concrete_frame_index=std::nullopt)
 Construct a BorrowedStackFrame that wraps an existing frame.
 ~BorrowedStackFrame () override=default
uint32_t GetFrameIndex () const override
 Query this frame to find what frame it is in this Thread's StackFrameList.
void SetFrameIndex (uint32_t index)
uint32_t GetConcreteFrameIndex () override
 Get the concrete frame index for this borrowed frame.
StackIDGetStackID () override
const AddressGetFrameCodeAddress () override
 Get an Address for the current pc value in this StackFrame.
Address GetFrameCodeAddressForSymbolication () override
 Get the current code Address suitable for symbolication, may not be the same as GetFrameCodeAddress().
bool ChangePC (lldb::addr_t pc) override
 Change the pc value for a given thread.
const SymbolContextGetSymbolContext (lldb::SymbolContextItem resolve_scope) override
 Provide a SymbolContext for this StackFrame's current pc value.
llvm::Error GetFrameBaseValue (Scalar &value) override
 Return the Canonical Frame Address (DWARF term) for this frame.
DWARFExpressionListGetFrameBaseExpression (Status *error_ptr) override
 Get the DWARFExpressionList corresponding to the Canonical Frame Address.
BlockGetFrameBlock () override
 Get the current lexical scope block for this StackFrame, if possible.
lldb::RegisterContextSP GetRegisterContext () override
 Get the RegisterContext for this frame, if possible.
VariableListGetVariableList (bool get_file_globals, Status *error_ptr) override
 Retrieve the list of variables whose scope either:
lldb::VariableListSP GetInScopeVariableList (bool get_file_globals, bool must_have_valid_location=false) override
 Retrieve the list of variables that are in scope at this StackFrame's pc.
lldb::ValueObjectSP GetValueForVariableExpressionPath (llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic, uint32_t options, lldb::VariableSP &var_sp, Status &error) override
 Create a ValueObject for a variable name / pathname, possibly including simple dereference/child selection syntax.
bool HasDebugInformation () override
 Determine whether this StackFrame has debug information available or not.
const char * Disassemble () override
 Return the disassembly for the instructions of this StackFrame's function as a single C string.
lldb::ValueObjectSP GetValueObjectForFrameVariable (const lldb::VariableSP &variable_sp, lldb::DynamicValueType use_dynamic) override
 Create a ValueObject for a given Variable in this StackFrame.
bool IsInlined () override
 Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived from the debug information and presented by the debugger.
bool IsSynthetic () const override
 Query whether this frame is synthetic.
bool IsHistorical () const override
 Query whether this frame is part of a historical backtrace.
bool IsArtificial () const override
 Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frames from a backtrace).
bool IsHidden () override
 Query whether this frame should be hidden from backtraces.
const char * GetFunctionName () override
 Get the frame's demangled name.
const char * GetDisplayFunctionName () override
 Get the frame's demangled display name.
lldb::ValueObjectSP FindVariable (ConstString name) override
 Attempt to reconstruct the ValueObject for a variable with a given name from within the current StackFrame, within the current block.
SourceLanguage GetLanguage () override
 Query this frame to determine what the default language should be when parsing expressions given the execution context.
SourceLanguage GuessLanguage () override
 Similar to GetLanguage(), but is allowed to take a potentially incorrect guess if exact information is not available.
lldb::ValueObjectSP GuessValueForAddress (lldb::addr_t addr) override
 Attempt to econstruct the ValueObject for a given raw address touched by the current instruction.
lldb::ValueObjectSP GuessValueForRegisterAndOffset (ConstString reg, int64_t offset) override
 Attempt to reconstruct the ValueObject for the address contained in a given register plus an offset.
StructuredData::ObjectSP GetLanguageSpecificData () override
 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::RecognizedStackFrameSP GetRecognizedFrame () override
lldb::StackFrameSP GetBorrowedFrame () const
 Get the underlying borrowed frame.
bool isA (const void *ClassID) const override
Public Member Functions inherited from lldb_private::StackFrame
 StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, lldb::addr_t cfa, bool cfa_is_valid, lldb::addr_t pc, Kind frame_kind, bool artificial, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr)
 Construct a StackFrame object without supplying a RegisterContextSP.
 StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa, lldb::addr_t pc, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr)
 StackFrame (const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx, lldb::user_id_t concrete_frame_idx, const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa, const Address &pc, bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr)
 ~StackFrame () override
lldb::ThreadSP GetThread () const
const lldb::RegisterContextSPGetRegisterContextSP () const
virtual bool DumpUsingFormat (Stream &strm, const lldb_private::FormatEntity::Entry *format, llvm::StringRef frame_marker={})
 Print a description of this frame using the provided frame format.
virtual void DumpUsingSettingsFormat (Stream *strm, bool show_unique=false, const char *frame_marker=nullptr)
 Print a description for this frame using the frame-format formatter settings.
virtual void Dump (Stream *strm, bool show_frame_index, bool show_fullpaths)
 Print a description for this frame using a default format.
virtual bool GetStatus (Stream &strm, bool show_frame_info, bool show_source, bool show_unique=false, const char *frame_marker=nullptr)
 Print a description of this stack frame and/or the source context/assembly for this stack frame.
void SetFrameIndex (uint32_t index)
 Set this frame's frame index.
lldb::TargetSP CalculateTarget () override
lldb::ProcessSP CalculateProcess () override
lldb::ThreadSP CalculateThread () override
lldb::StackFrameSP CalculateStackFrame () override
void CalculateExecutionContext (ExecutionContext &exe_ctx) override
 Reconstruct the object's execution context into sc.
virtual lldb::StackFrameListSP GetContainingStackFrameList () const
 Get the StackFrameList that contains this frame.
Public Member Functions inherited from lldb_private::ExecutionContextScope
virtual ~ExecutionContextScope ()=default

Static Public Member Functions

static bool classof (const StackFrame *obj)
static bool classof (const StackFrame *obj)

Private Member Functions

 BorrowedStackFrame (const BorrowedStackFrame &)=delete
const BorrowedStackFrameoperator= (const BorrowedStackFrame &)=delete

Private Attributes

lldb::StackFrameSP m_borrowed_frame_sp
uint32_t m_new_frame_index
uint32_t m_new_concrete_frame_index

Static Private Attributes

static char ID

Additional Inherited Members

Public Types inherited from lldb_private::StackFrame
enum  ExpressionPathOption {
  eExpressionPathOptionCheckPtrVsMember = (1u << 0) , eExpressionPathOptionsNoFragileObjcIvar = (1u << 1) , eExpressionPathOptionsNoSyntheticChildren = (1u << 2) , eExpressionPathOptionsNoSyntheticArrayRange = (1u << 3) ,
  eExpressionPathOptionsAllowDirectIVarAccess = (1u << 4) , eExpressionPathOptionsInspectAnonymousUnions = (1u << 5)
}
enum class  Kind { Regular , History , Synthetic }
static char ID
 LLVM RTTI support.
Protected Member Functions inherited from lldb_private::StackFrame
void SetSymbolContextScope (SymbolContextScope *symbol_scope)
void UpdateCurrentFrameFromPreviousFrame (StackFrame &prev_frame)
void UpdatePreviousFrameFromCurrentFrame (StackFrame &curr_frame)
bool HasCachedData () const
Protected Attributes inherited from lldb_private::StackFrame
Address m_frame_code_addr
 The frame code address (might not be the same as the actual PC for inlined frames) as a section/offset address.
SymbolContext m_sc
Flags m_flags
Scalar m_frame_base
Status m_frame_base_error
uint16_t m_frame_recognizer_generation = 0
bool m_cfa_is_valid
 Does this frame have a CFA? Different from CFA == LLDB_INVALID_ADDRESS.
Kind m_stack_frame_kind
bool m_artificial
 Is this an artificial stack frame (e.g.
bool m_behaves_like_zeroth_frame
 Whether this frame behaves like the zeroth frame, in the sense that its pc value might not immediately follow a call (and thus might be the first address of its function).
lldb::VariableListSP m_variable_list_sp
lldb::StackFrameListWP m_frame_list_wp
ValueObjectList m_variable_list_value_objects
 Value objects for each variable in m_variable_list_sp.
std::optional< lldb::RecognizedStackFrameSPm_recognized_frame_sp
StreamString m_disassembly
std::recursive_mutex m_mutex
lldb::ThreadWP m_thread_wp
 For StackFrame and derived classes only.
uint32_t m_frame_index
uint32_t m_concrete_frame_index
lldb::RegisterContextSP m_reg_context_sp
StackID m_id

Detailed Description

"lldb/Target/BorrowedStackFrame.h"

A wrapper around an existing StackFrame that supersedes its frame indices.

This class is useful when you need to present an existing stack frame with a different index, such as when creating synthetic frame views or renumbering frames without copying all the underlying data.

All methods delegate to the borrowed frame except for GetFrameIndex() & GetConcreteFrameIndex() which uses the overridden indices.

Definition at line 27 of file BorrowedStackFrame.h.

Constructor & Destructor Documentation

◆ BorrowedStackFrame() [1/2]

BorrowedStackFrame::BorrowedStackFrame ( lldb::StackFrameSP borrowed_frame_sp,
uint32_t new_frame_index,
std::optional< uint32_t > new_concrete_frame_index = std::nullopt )

Construct a BorrowedStackFrame that wraps an existing frame.

Parameters
[in]borrowed_frame_spThe existing StackFrame to borrow from. This frame's data will be used for all operations except frame index queries.
[in]new_frame_indexThe frame index to report instead of the borrowed frame's index.
[in]new_concrete_frame_indexOptional concrete frame index. If not provided, defaults to new_frame_index.

Definition at line 16 of file BorrowedStackFrame.cpp.

References GetConcreteFrameIndex(), lldb_private::StackFrame::GetRegisterContextSP(), GetStackID(), GetSymbolContext(), lldb_private::StackFrame::GetThread(), IsInlined(), LLDB_INVALID_FRAME_ID, lldb_private::StackFrame::m_behaves_like_zeroth_frame, m_borrowed_frame_sp, m_new_concrete_frame_index, m_new_frame_index, and lldb_private::StackFrame::StackFrame().

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

◆ ~BorrowedStackFrame()

lldb_private::BorrowedStackFrame::~BorrowedStackFrame ( )
overridedefault

◆ BorrowedStackFrame() [2/2]

lldb_private::BorrowedStackFrame::BorrowedStackFrame ( const BorrowedStackFrame & )
privatedelete

References BorrowedStackFrame().

Member Function Documentation

◆ ChangePC()

bool BorrowedStackFrame::ChangePC ( lldb::addr_t pc)
overridevirtual

Change the pc value for a given thread.

Change the current pc value for the frame on this thread.

Parameters
[in]pcThe load address that the pc will be set to.
Returns
true if the pc was changed. false if this failed – possibly because this frame is not a live StackFrame.

Reimplemented from lldb_private::StackFrame.

Definition at line 62 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp, and pc.

◆ classof()

bool BorrowedStackFrame::classof ( const StackFrame * obj)
static

◆ Disassemble()

const char * BorrowedStackFrame::Disassemble ( )
overridevirtual

Return the disassembly for the instructions of this StackFrame's function as a single C string.

Returns
C string with the assembly instructions for this function.

Reimplemented from lldb_private::StackFrame.

Definition at line 111 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ FindVariable()

ValueObjectSP BorrowedStackFrame::FindVariable ( ConstString name)
overridevirtual

Attempt to reconstruct the ValueObject for a variable with a given name from within the current StackFrame, within the current block.

The search for the variable starts in the deepest block corresponding to the current PC in the stack frame and traverse through all parent blocks stopping at inlined function boundaries.

Parameters
[in]nameThe name of the variable.
Returns
The ValueObject if found.

Reimplemented from lldb_private::StackFrame.

Definition at line 147 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetBorrowedFrame()

StackFrameSP BorrowedStackFrame::GetBorrowedFrame ( ) const

Get the underlying borrowed frame.

Definition at line 177 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetConcreteFrameIndex()

uint32_t BorrowedStackFrame::GetConcreteFrameIndex ( )
overridevirtual

Get the concrete frame index for this borrowed frame.

Returns the overridden concrete frame index provided at construction, or LLDB_INVALID_FRAME_ID if the borrowed frame represents an inlined function, since this would require some computation if we chain inlined borrowed stack frames.

Returns
The concrete frame index, or LLDB_INVALID_FRAME_ID for inline frames.

Reimplemented from lldb_private::StackFrame.

Definition at line 42 of file BorrowedStackFrame.cpp.

References m_new_concrete_frame_index.

Referenced by BorrowedStackFrame().

◆ GetDisplayFunctionName()

const char * BorrowedStackFrame::GetDisplayFunctionName ( )
overridevirtual

Get the frame's demangled display name.

///

Returns
A C-String containing the function demangled display name. Can be null.

Reimplemented from lldb_private::StackFrame.

Definition at line 143 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameBaseExpression()

DWARFExpressionList * BorrowedStackFrame::GetFrameBaseExpression ( Status * error_ptr)
overridevirtual

Get the DWARFExpressionList corresponding to the Canonical Frame Address.

Often a register (bp), but sometimes a register + offset.

Parameters
[out]error_ptrIf there is an error determining the CFA address, this may contain a string explaining the failure.
Returns
Returns the corresponding DWARF expression, or NULL.

Reimplemented from lldb_private::StackFrame.

Definition at line 76 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameBaseValue()

llvm::Error BorrowedStackFrame::GetFrameBaseValue ( Scalar & value)
overridevirtual

Return the Canonical Frame Address (DWARF term) for this frame.

The CFA is typically the value of the stack pointer register before the call invocation is made. It will not change during the lifetime of a stack frame. It is often not the same thing as the frame pointer register value.

Live StackFrames will always have a CFA but other types of frames may not be able to supply one.

Parameters
[out]valueThe address of the CFA for this frame, if available.
Returns
If there is an error determining the CFA address, return an error explaining the failure. Success otherwise.

Reimplemented from lldb_private::StackFrame.

Definition at line 71 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameBlock()

Block * BorrowedStackFrame::GetFrameBlock ( )
overridevirtual

Get the current lexical scope block for this StackFrame, if possible.

If debug information is available for this stack frame, return a pointer to the innermost lexical Block that the frame is currently executing.

Returns
A pointer to the current Block. nullptr is returned if this can not be provided.

Reimplemented from lldb_private::StackFrame.

Definition at line 80 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameCodeAddress()

const Address & BorrowedStackFrame::GetFrameCodeAddress ( )
overridevirtual

Get an Address for the current pc value in this StackFrame.

May not be the same as the actual PC value for inlined stack frames.

Returns
The Address object set to the current PC value.

Reimplemented from lldb_private::StackFrame.

Definition at line 54 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameCodeAddressForSymbolication()

Address BorrowedStackFrame::GetFrameCodeAddressForSymbolication ( )
overridevirtual

Get the current code Address suitable for symbolication, may not be the same as GetFrameCodeAddress().

For a frame in the middle of the stack, the return-pc is the current code address, but for symbolication purposes the return address after a noreturn call may point to the next function, a DWARF location list entry that is a completely different code path, or the wrong source line.

The address returned should be used for symbolication (source line, block, function, DWARF location entry selection) but should NOT be shown to the user. It may not point to an actual instruction boundary.

Returns
The Address object set to the current PC value.

Reimplemented from lldb_private::StackFrame.

Definition at line 58 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetFrameIndex()

uint32_t BorrowedStackFrame::GetFrameIndex ( ) const
overridevirtual

Query this frame to find what frame it is in this Thread's StackFrameList.

Returns
StackFrame index 0 indicates the currently-executing function. Inline frames are included in this frame index count.

Reimplemented from lldb_private::StackFrame.

Definition at line 36 of file BorrowedStackFrame.cpp.

References m_new_frame_index.

◆ GetFunctionName()

const char * BorrowedStackFrame::GetFunctionName ( )
overridevirtual

Get the frame's demangled name.

///

Returns
A C-String containing the function demangled name. Can be null.

Reimplemented from lldb_private::StackFrame.

Definition at line 139 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetInScopeVariableList()

VariableListSP BorrowedStackFrame::GetInScopeVariableList ( bool get_file_globals,
bool must_have_valid_location = false )
overridevirtual

Retrieve the list of variables that are in scope at this StackFrame's pc.

A frame that is not live may return an empty VariableListSP for a given pc value even though variables would be available at this point if it were a live stack frame.

Parameters
[in]get_file_globalsWhether to also retrieve compilation-unit scoped variables that are visible to the entire compilation unit (e.g. file static in C, globals that are homed in this CU).
[in]must_have_valid_locationWhether to filter variables whose location is not available at this StackFrame's pc.
Returns
A pointer to a list of variables.

Reimplemented from lldb_private::StackFrame.

Definition at line 94 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetLanguage()

SourceLanguage BorrowedStackFrame::GetLanguage ( )
overridevirtual

Query this frame to determine what the default language should be when parsing expressions given the execution context.

Returns
The language of the frame if known.

Reimplemented from lldb_private::StackFrame.

Definition at line 151 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetLanguageSpecificData()

StructuredData::ObjectSP BorrowedStackFrame::GetLanguageSpecificData ( )
overridevirtual

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.

Reimplemented from lldb_private::StackFrame.

Definition at line 169 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetRecognizedFrame()

RecognizedStackFrameSP BorrowedStackFrame::GetRecognizedFrame ( )
overridevirtual

Reimplemented from lldb_private::StackFrame.

Definition at line 173 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetRegisterContext()

RegisterContextSP BorrowedStackFrame::GetRegisterContext ( )
overridevirtual

Get the RegisterContext for this frame, if possible.

Returns a shared pointer to the RegisterContext for this stack frame. Only a live StackFrame object will be able to return a RegisterContext - callers must be prepared for an empty shared pointer being returned.

Even a live StackFrame RegisterContext may not be able to provide all registers. Only the currently executing frame (frame 0) can reliably provide every register in the register context.

Returns
The RegisterContext shared point for this frame.

Reimplemented from lldb_private::StackFrame.

Definition at line 84 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetStackID()

StackID & BorrowedStackFrame::GetStackID ( )
overridevirtual

Reimplemented from lldb_private::StackFrame.

Definition at line 50 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

Referenced by BorrowedStackFrame().

◆ GetSymbolContext()

const SymbolContext & BorrowedStackFrame::GetSymbolContext ( lldb::SymbolContextItem resolve_scope)
overridevirtual

Provide a SymbolContext for this StackFrame's current pc value.

The StackFrame maintains this SymbolContext and adds additional information to it on an as-needed basis. This helps to avoid different functions looking up symbolic information for a given pc value multiple times.

Parameters
[in]resolve_scopeFlags from the SymbolContextItem enumerated type which specify what type of symbol context is needed by this caller.
Returns
A SymbolContext reference which includes the types of information requested by resolve_scope, if they are available.

Reimplemented from lldb_private::StackFrame.

Definition at line 67 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

Referenced by BorrowedStackFrame().

◆ GetValueForVariableExpressionPath()

ValueObjectSP BorrowedStackFrame::GetValueForVariableExpressionPath ( llvm::StringRef var_expr,
lldb::DynamicValueType use_dynamic,
uint32_t options,
lldb::VariableSP & var_sp,
Status & error )
overridevirtual

Create a ValueObject for a variable name / pathname, possibly including simple dereference/child selection syntax.

Parameters
[in]var_exprThe string specifying a variable to base the VariableObject off of.
[in]use_dynamicWhether the correct dynamic type of an object pointer should be determined before creating the object, or if the static type is sufficient. One of the DynamicValueType enumerated values.
[in]optionsAn unsigned integer of flags, values from StackFrame::ExpressionPathOption enum.
[in]var_spA VariableSP that will be set to the variable described in the var_expr path.
[in]errorRecord any errors encountered while evaluating var_expr.
Returns
A shared pointer to the ValueObject described by var_expr.

Reimplemented from lldb_private::StackFrame.

Definition at line 100 of file BorrowedStackFrame.cpp.

References error(), and m_borrowed_frame_sp.

◆ GetValueObjectForFrameVariable()

ValueObjectSP BorrowedStackFrame::GetValueObjectForFrameVariable ( const lldb::VariableSP & variable_sp,
lldb::DynamicValueType use_dynamic )
overridevirtual

Create a ValueObject for a given Variable in this StackFrame.

Parameters
[in]variable_spThe Variable to base this ValueObject on
[in]use_dynamicWhether the correct dynamic type of the variable should be determined before creating the ValueObject, or if the static type is sufficient. One of the DynamicValueType enumerated values.
Returns
A ValueObject for this variable.

Reimplemented from lldb_private::StackFrame.

Definition at line 115 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GetVariableList()

VariableList * BorrowedStackFrame::GetVariableList ( bool get_file_globals,
Status * error_ptr )
overridevirtual

Retrieve the list of variables whose scope either:

A frame that is not live may return an empty VariableList for a given pc value even though variables would be available at this point if it were a live stack frame.

Parameters
[in]get_file_globalsWhether to also retrieve compilation-unit scoped variables that are visible to the entire compilation unit (e.g. file static in C, globals that are homed in this CU).
[out]error_ptrIf there is an error in the debug information that prevents variables from being fetched.
See also
SymbolFile::GetFrameVariableError() for full details.
Returns
A pointer to a list of variables.

Reimplemented from lldb_private::StackFrame.

Definition at line 88 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GuessLanguage()

SourceLanguage BorrowedStackFrame::GuessLanguage ( )
overridevirtual

Similar to GetLanguage(), but is allowed to take a potentially incorrect guess if exact information is not available.

Reimplemented from lldb_private::StackFrame.

Definition at line 155 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GuessValueForAddress()

ValueObjectSP BorrowedStackFrame::GuessValueForAddress ( lldb::addr_t addr)
overridevirtual

Attempt to econstruct the ValueObject for a given raw address touched by the current instruction.

The ExpressionPath should indicate how to get to this value using "frame variable."

Parameters
[in]addrThe raw address.
Returns
The ValueObject if found. If valid, it has a valid ExpressionPath.

Reimplemented from lldb_private::StackFrame.

Definition at line 159 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ GuessValueForRegisterAndOffset()

ValueObjectSP BorrowedStackFrame::GuessValueForRegisterAndOffset ( ConstString reg,
int64_t offset )
overridevirtual

Attempt to reconstruct the ValueObject for the address contained in a given register plus an offset.

The ExpressionPath should indicate how to get to this value using "frame variable."

Parameters
[in]regThe name of the register.
[in]offsetThe offset from the register. Particularly important for sp...
Returns
The ValueObject if found. If valid, it has a valid ExpressionPath.

Reimplemented from lldb_private::StackFrame.

Definition at line 164 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ HasDebugInformation()

bool BorrowedStackFrame::HasDebugInformation ( )
overridevirtual

Determine whether this StackFrame has debug information available or not.

Returns
true if debug information is available for this frame (function, compilation unit, block, etc.)

Reimplemented from lldb_private::StackFrame.

Definition at line 107 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ isA()

bool BorrowedStackFrame::isA ( const void * ClassID) const
overridevirtual

Reimplemented from lldb_private::StackFrame.

Definition at line 181 of file BorrowedStackFrame.cpp.

References ID, and lldb_private::StackFrame::isA().

◆ IsArtificial()

bool BorrowedStackFrame::IsArtificial ( ) const
overridevirtual

Query whether this frame is artificial (e.g a synthesized result of inferring missing tail call frames from a backtrace).

Artificial frames may have limited support for inspecting variables.

Reimplemented from lldb_private::StackFrame.

Definition at line 133 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ IsHidden()

bool BorrowedStackFrame::IsHidden ( )
overridevirtual

Query whether this frame should be hidden from backtraces.

Frame recognizers can customize this behavior and hide distracting system implementation details this way.

Reimplemented from lldb_private::StackFrame.

Definition at line 137 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ IsHistorical()

bool BorrowedStackFrame::IsHistorical ( ) const
overridevirtual

Query whether this frame is part of a historical backtrace.

Reimplemented from lldb_private::StackFrame.

Definition at line 129 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ IsInlined()

bool BorrowedStackFrame::IsInlined ( )
overridevirtual

Query whether this frame is a concrete frame on the call stack, or if it is an inlined frame derived from the debug information and presented by the debugger.

Returns
true if this is an inlined frame.

Reimplemented from lldb_private::StackFrame.

Definition at line 121 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

Referenced by BorrowedStackFrame().

◆ IsSynthetic()

bool BorrowedStackFrame::IsSynthetic ( ) const
overridevirtual

Query whether this frame is synthetic.

Reimplemented from lldb_private::StackFrame.

Definition at line 125 of file BorrowedStackFrame.cpp.

References m_borrowed_frame_sp.

◆ operator=()

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

References BorrowedStackFrame().

◆ SetFrameIndex()

void BorrowedStackFrame::SetFrameIndex ( uint32_t index)

Definition at line 38 of file BorrowedStackFrame.cpp.

References m_new_frame_index.

Member Data Documentation

◆ ID

char BorrowedStackFrame::ID
staticprivate

Definition at line 138 of file BorrowedStackFrame.h.

Referenced by classof(), and isA().

◆ m_borrowed_frame_sp

◆ m_new_concrete_frame_index

uint32_t lldb_private::BorrowedStackFrame::m_new_concrete_frame_index
private

Definition at line 137 of file BorrowedStackFrame.h.

Referenced by BorrowedStackFrame(), and GetConcreteFrameIndex().

◆ m_new_frame_index

uint32_t lldb_private::BorrowedStackFrame::m_new_frame_index
private

Definition at line 136 of file BorrowedStackFrame.h.

Referenced by BorrowedStackFrame(), GetFrameIndex(), and SetFrameIndex().


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