|
LLDB mainline
|
#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 |
| SymbolContextScope * | GetSymbolContextScope () const |
| void | SetSymbolContextScope (SymbolContextScope *symbol_scope) |
| uint32_t | GetTailCallDepth () const |
| void | SetTailCallDepth (uint32_t depth) |
| void | Clear () |
| bool | IsValid () const |
| void | Dump (Stream *s) |
| bool | IsYoungerThan (const StackID &other, Process &process) const |
| Returns true if this StackID corresponds to a frame younger (i.e. | |
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). | |
| SymbolContextScope * | m_symbol_scope = nullptr |
| If nullptr, there is no block or symbol for this frame. | |
| uint32_t | m_tail_call_depth = 0 |
| For a synthesized tail call frame, which has the CFA of the younger frame that replaced it, its position in the chain of tail calls after that frame (1, 2, ...). | |
Friends | |
| class | StackFrame |
| class | SyntheticStackFrameList |
|
default |
References pc.
Referenced by IsYoungerThan().
|
explicit |
Definition at line 19 of file StackID.cpp.
References lldb_private::Process::FixCodeAddress(), lldb_private::Process::FixDataAddress(), m_cfa, m_cfa_with_metadata, m_pc, m_symbol_scope, and pc.
|
default |
|
inline |
Definition at line 48 of file StackID.h.
References LLDB_INVALID_ADDRESS, m_cfa, m_pc, m_symbol_scope, and m_tail_call_depth.
| void StackID::Dump | ( | Stream * | s | ) |
Definition at line 38 of file StackID.cpp.
References lldb_private::SymbolContext::block, lldb_private::Symbol::GetID(), lldb_private::UserID::GetID(), m_cfa, m_pc, m_symbol_scope, m_tail_call_depth, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::SymbolContext::symbol.
Referenced by lldb_private::StackFrameList::Dump().
|
inline |
Definition at line 32 of file StackID.h.
References m_cfa_with_metadata.
Referenced by lldb_private::StackFrameList::SynthesizeTailCallFrames().
|
inline |
Definition at line 36 of file StackID.h.
References m_cfa.
Referenced by lldb_private::wasm::ProcessWasm::CompareCFAs(), IsYoungerThan(), and lldb_private::operator==().
|
inline |
Definition at line 30 of file StackID.h.
References m_pc.
Referenced by lldb_private::operator==(), and lldb_private::StackFrame::UpdatePreviousFrameFromCurrentFrame().
|
inline |
Definition at line 38 of file StackID.h.
References m_symbol_scope.
Referenced by IsYoungerThan(), and lldb_private::operator==().
|
inline |
Definition at line 44 of file StackID.h.
References m_tail_call_depth.
Referenced by lldb_private::operator==().
|
inline |
Definition at line 55 of file StackID.h.
References LLDB_INVALID_ADDRESS, m_cfa, and m_pc.
Referenced by lldb_private::ThreadPlanStepRange::CompareCurrentFrameToStartFrame(), lldb_private::StackFrameList::GetFrameWithStackID(), lldb_private::Thread::GetFrameWithStackID(), and lldb_private::Process::RunThreadPlan().
Returns true if this StackID corresponds to a frame younger (i.e.
higher on the call stack) than other, and false otherwise (including when the frames are not comparable, in some cases where this can be detected). process and then its language runtimes get the first say, see Process::CompareCFAs() and LanguageRuntime::CompareCFAs().
Definition at line 78 of file StackID.cpp.
References lldb_private::SymbolContext::block, lldb_private::SymbolContextScope::CalculateSymbolContext(), lldb_private::LanguageRuntime::CompareCFAs(), lldb_private::Process::CompareCFAs(), lldb_private::Block::Contains(), lldb_private::SymbolContext::function, GetCallFrameAddressWithoutMetadata(), GetSymbolContextScope(), m_tail_call_depth, lldb_private::NoOpinion, lldb_private::Older, StackID(), and lldb_private::Younger.
Referenced by lldb_private::ThreadPlanStepUntil::AnalyzeStop(), lldb_private::ThreadPlanStepRange::CompareCurrentFrameToStartFrame(), lldb_private::ThreadPlanStepInstruction::IsPlanStale(), lldb_private::ThreadPlanStepOut::IsPlanStale(), and lldb_private::ThreadPlanStepOut::ShouldStop().
|
protected |
Definition at line 33 of file StackID.cpp.
References lldb_private::Process::FixDataAddress(), m_cfa, and m_cfa_with_metadata.
|
protected |
Definition at line 29 of file StackID.cpp.
References lldb_private::Process::FixCodeAddress(), m_pc, and pc.
|
inline |
Definition at line 40 of file StackID.h.
References m_symbol_scope.
|
inline |
Definition at line 46 of file StackID.h.
References m_tail_call_depth.
|
friend |
|
friend |
Definition at line 70 of file StackID.h.
References pc, and SyntheticStackFrameList.
Referenced by SyntheticStackFrameList.
|
protected |
|
protected |
The cfa with metadata (i.e. prior to Process::FixAddress).
Definition at line 86 of file StackID.h.
Referenced by GetCallFrameAddressWithMetadata(), SetCFA(), and StackID().
|
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 78 of file StackID.h.
Referenced by Clear(), Dump(), GetPC(), IsValid(), SetPC(), and StackID().
|
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 93 of file StackID.h.
Referenced by Clear(), Dump(), GetSymbolContextScope(), SetSymbolContextScope(), and StackID().
|
protected |
For a synthesized tail call frame, which has the CFA of the younger frame that replaced it, its position in the chain of tail calls after that frame (1, 2, ...).
0 for every other frame.
Definition at line 98 of file StackID.h.
Referenced by Clear(), Dump(), GetTailCallDepth(), IsYoungerThan(), and SetTailCallDepth().