LLDB mainline
lldb_private::StackID Class Reference

#include <StackID.h>

Public Member Functions

 StackID ()=default
 StackID (lldb::addr_t pc, lldb::addr_t cfa, SymbolContextScope *symbol_scope, Process *process)
 ~StackID ()=default
lldb::addr_t GetPC () const
lldb::addr_t GetCallFrameAddressWithMetadata () const
lldb::addr_t GetCallFrameAddressWithoutMetadata () const
SymbolContextScopeGetSymbolContextScope () const
void SetSymbolContextScope (SymbolContextScope *symbol_scope)
void Clear ()
bool IsValid () const
void Dump (Stream *s)

Protected Member Functions

void SetPC (lldb::addr_t pc, Process *process)
void SetCFA (lldb::addr_t cfa, Process *process)

Protected Attributes

lldb::addr_t m_pc = LLDB_INVALID_ADDRESS
 The pc value for the function/symbol for this frame.
lldb::addr_t m_cfa = LLDB_INVALID_ADDRESS
 The call frame address (stack pointer) value at the beginning of the function that uniquely identifies this frame (along with m_symbol_scope below)
lldb::addr_t m_cfa_with_metadata = LLDB_INVALID_ADDRESS
 The cfa with metadata (i.e. prior to Process::FixAddress).
SymbolContextScopem_symbol_scope = nullptr
 If nullptr, there is no block or symbol for this frame.

Friends

class StackFrame

Detailed Description

Definition at line 18 of file StackID.h.

Constructor & Destructor Documentation

◆ StackID() [1/2]

lldb_private::StackID::StackID ( )
default

References pc.

◆ StackID() [2/2]

StackID::StackID ( lldb::addr_t pc,
lldb::addr_t cfa,
SymbolContextScope * symbol_scope,
Process * process )
explicit

◆ ~StackID()

lldb_private::StackID::~StackID ( )
default

Member Function Documentation

◆ Clear()

void lldb_private::StackID::Clear ( )
inline

Definition at line 41 of file StackID.h.

References LLDB_INVALID_ADDRESS, m_cfa, m_pc, and m_symbol_scope.

◆ Dump()

◆ GetCallFrameAddressWithMetadata()

lldb::addr_t lldb_private::StackID::GetCallFrameAddressWithMetadata ( ) const
inline

Definition at line 29 of file StackID.h.

References m_cfa_with_metadata.

◆ GetCallFrameAddressWithoutMetadata()

lldb::addr_t lldb_private::StackID::GetCallFrameAddressWithoutMetadata ( ) const
inline

Definition at line 33 of file StackID.h.

References m_cfa.

Referenced by lldb_private::operator<(), and lldb_private::operator==().

◆ GetPC()

lldb::addr_t lldb_private::StackID::GetPC ( ) const
inline

◆ GetSymbolContextScope()

SymbolContextScope * lldb_private::StackID::GetSymbolContextScope ( ) const
inline

Definition at line 35 of file StackID.h.

References m_symbol_scope.

Referenced by lldb_private::operator<(), and lldb_private::operator==().

◆ IsValid()

◆ SetCFA()

void StackID::SetCFA ( lldb::addr_t cfa,
Process * process )
protected

Definition at line 32 of file StackID.cpp.

References lldb_private::Process::FixDataAddress(), m_cfa, and m_cfa_with_metadata.

◆ SetPC()

void StackID::SetPC ( lldb::addr_t pc,
Process * process )
protected

Definition at line 28 of file StackID.cpp.

References lldb_private::Process::FixCodeAddress(), m_pc, and pc.

◆ SetSymbolContextScope()

void lldb_private::StackID::SetSymbolContextScope ( SymbolContextScope * symbol_scope)
inline

Definition at line 37 of file StackID.h.

References m_symbol_scope.

◆ StackFrame

friend class StackFrame
friend

Definition at line 54 of file StackID.h.

References pc, and StackFrame.

Referenced by StackFrame.

Member Data Documentation

◆ m_cfa

lldb::addr_t lldb_private::StackID::m_cfa = LLDB_INVALID_ADDRESS
protected

The call frame address (stack pointer) value at the beginning of the function that uniquely identifies this frame (along with m_symbol_scope below)

Definition at line 67 of file StackID.h.

Referenced by Clear(), Dump(), GetCallFrameAddressWithoutMetadata(), IsValid(), SetCFA(), and StackID().

◆ m_cfa_with_metadata

lldb::addr_t lldb_private::StackID::m_cfa_with_metadata = LLDB_INVALID_ADDRESS
protected

The cfa with metadata (i.e. prior to Process::FixAddress).

Definition at line 70 of file StackID.h.

Referenced by GetCallFrameAddressWithMetadata(), SetCFA(), and StackID().

◆ m_pc

lldb::addr_t lldb_private::StackID::m_pc = LLDB_INVALID_ADDRESS
protected

The pc value for the function/symbol for this frame.

This will only get used if the symbol scope is nullptr (the code where we are stopped is not represented by any function or symbol in any shared library).

Definition at line 62 of file StackID.h.

Referenced by Clear(), Dump(), GetPC(), IsValid(), SetPC(), and StackID().

◆ m_symbol_scope

SymbolContextScope* lldb_private::StackID::m_symbol_scope = nullptr
protected

If nullptr, there is no block or symbol for this frame.

If not nullptr, this will either be the scope for the lexical block for the frame, or the scope for the symbol. Symbol context scopes are always be unique pointers since the are part of the Block and Symbol objects and can easily be used to tell if a stack ID is the same as another.

Definition at line 77 of file StackID.h.

Referenced by Clear(), Dump(), GetSymbolContextScope(), SetSymbolContextScope(), and StackID().


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