pub struct SBFrame {
pub raw: SBFrameRef,
}
Expand description
One of the stack frames associated with a thread.
Fields
raw: SBFrameRef
The underlying raw SBFrameRef
.
Implementations
sourceimpl SBFrame
impl SBFrame
sourcepub fn frame_id(&self) -> u32
pub fn frame_id(&self) -> u32
The zero-based stack frame index for this frame.
This can be used to locate adjacent frames in the thread’s stack frames.
sourcepub fn cfa(&self) -> Option<lldb_addr_t>
pub fn cfa(&self) -> Option<lldb_addr_t>
Get the Canonical Frame Address for this stack frame.
This is the DWARF standard’s definition of a CFA, a stack address that remains constant throughout the lifetime of the function.
sourcepub fn pc(&self) -> lldb_addr_t
pub fn pc(&self) -> lldb_addr_t
The program counter (PC) as an unsigned integer.
pub fn set_pc(&self, new_pc: lldb_addr_t) -> bool
sourcepub fn sp(&self) -> lldb_addr_t
pub fn sp(&self) -> lldb_addr_t
The stack pointer address as an unsigned integer.
sourcepub fn fp(&self) -> lldb_addr_t
pub fn fp(&self) -> lldb_addr_t
The frame pointer address as an unsigned integer.
sourcepub fn pc_address(&self) -> SBAddress
pub fn pc_address(&self) -> SBAddress
The program counter (PC) as a section offset address (SBAddress
).
sourcepub fn symbol_context(&self, resolve_scope: u32) -> SBSymbolContext
pub fn symbol_context(&self, resolve_scope: u32) -> SBSymbolContext
The symbol context for this frame’s current pc value.
The frame maintains this symbol context and adds information to it as needed. This helps avoid repeated lookups of the same information.
resolve_scope
: Flags that specify what type of symbol context is needed by the caller. These flags have constants starting withSYMBOL_CONTEXT_ITEM_
.
sourcepub fn compile_unit(&self) -> SBCompileUnit
pub fn compile_unit(&self) -> SBCompileUnit
The SBCompileUnit
for this stack frame.
sourcepub fn function(&self) -> SBFunction
pub fn function(&self) -> SBFunction
The SBFunction
for this stack frame.
sourcepub fn function_name(&self) -> Option<&str>
pub fn function_name(&self) -> Option<&str>
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)
None
See also is_inlined
.
pub fn display_function_name(&self) -> Option<&str>
sourcepub fn is_inlined(&self) -> bool
pub fn is_inlined(&self) -> bool
Return true
if this frame represents an inlined function.
sourcepub fn evaluate_expression(
&self,
expression: &str,
options: &SBExpressionOptions
) -> SBValue
pub fn evaluate_expression(
&self,
expression: &str,
options: &SBExpressionOptions
) -> SBValue
Evaluate an expression within the context of this frame.
sourcepub fn frame_block(&self) -> SBBlock
pub fn frame_block(&self) -> SBBlock
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::block()
) 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.
sourcepub fn line_entry(&self) -> Option<SBLineEntry>
pub fn line_entry(&self) -> Option<SBLineEntry>
The line table entry (SBLineEntry
) for this stack frame.
sourcepub fn disassemble(&self) -> &str
pub fn disassemble(&self) -> &str
The disassembly of this function, presented as a string.
sourcepub fn variables(&self, options: &SBVariablesOptions) -> SBValueList
pub fn variables(&self, options: &SBVariablesOptions) -> SBValueList
The values for variables matching the specified options.
sourcepub fn all_variables(&self) -> SBValueList
pub fn all_variables(&self) -> SBValueList
The values for all variables in this stack frame.
sourcepub fn arguments(&self) -> SBValueList
pub fn arguments(&self) -> SBValueList
The values for the argument variables in this stack frame.
sourcepub fn locals(&self) -> SBValueList
pub fn locals(&self) -> SBValueList
The values for the local variables in this stack frame.
sourcepub fn statics(&self) -> SBValueList
pub fn statics(&self) -> SBValueList
The values for the static variables in this stack frame.
sourcepub fn registers(&self) -> SBValueList
pub fn registers(&self) -> SBValueList
The values for the CPU registers for this stack frame.
sourcepub fn find_register(&self, name: &str) -> Option<SBValue>
pub fn find_register(&self, name: &str) -> Option<SBValue>
The value for a particular register, if present.
sourcepub fn parent_frame(&self) -> Option<SBFrame>
pub fn parent_frame(&self) -> Option<SBFrame>
The parent frame that invoked this frame, if available.