SBFrame

Struct SBFrame 

Source
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§

Source§

impl SBFrame

Source

pub fn is_valid(&self) -> bool

Check whether or not this is a valid SBFrame value.

Source

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.

Source

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.

Source

pub fn pc(&self) -> lldb_addr_t

The program counter (PC) as an unsigned integer.

Source

pub fn set_pc(&self, new_pc: lldb_addr_t) -> bool

Source

pub fn sp(&self) -> lldb_addr_t

The stack pointer address as an unsigned integer.

Source

pub fn fp(&self) -> lldb_addr_t

The frame pointer address as an unsigned integer.

Source

pub fn pc_address(&self) -> SBAddress

The program counter (PC) as a section offset address (SBAddress).

Source

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 with SYMBOL_CONTEXT_ITEM_.
Source

pub fn module(&self) -> SBModule

The SBModule for this stack frame.

Source

pub fn compile_unit(&self) -> SBCompileUnit

The SBCompileUnit for this stack frame.

Source

pub fn function(&self) -> SBFunction

The SBFunction for this stack frame.

Source

pub fn symbol(&self) -> SBSymbol

The SBSymbol for this stack frame.

Source

pub fn block(&self) -> SBBlock

Get the deepest block that contains the frame PC.

Source

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.

Source

pub fn display_function_name(&self) -> Option<&str>

Source

pub fn is_inlined(&self) -> bool

Return true if this frame represents an inlined function.

Source

pub fn evaluate_expression( &self, expression: &str, options: &SBExpressionOptions, ) -> SBValue

Evaluate an expression within the context of this frame.

Source

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.

Source

pub fn line_entry(&self) -> Option<SBLineEntry>

The line table entry (SBLineEntry) for this stack frame.

Source

pub fn thread(&self) -> SBThread

The thread that is executing this stack frame.

Source

pub fn disassemble(&self) -> &str

The disassembly of this function, presented as a string.

Source

pub fn variables(&self, options: &SBVariablesOptions) -> SBValueList

The values for variables matching the specified options.

Source

pub fn all_variables(&self) -> SBValueList

The values for all variables in this stack frame.

Source

pub fn arguments(&self) -> SBValueList

The values for the argument variables in this stack frame.

Source

pub fn locals(&self) -> SBValueList

The values for the local variables in this stack frame.

Source

pub fn statics(&self) -> SBValueList

The values for the static variables in this stack frame.

Source

pub fn registers(&self) -> SBValueList

The values for the CPU registers for this stack frame.

Source

pub fn find_register(&self, name: &str) -> Option<SBValue>

The value for a particular register, if present.

Source

pub fn parent_frame(&self) -> Option<SBFrame>

The parent frame that invoked this frame, if available.

Trait Implementations§

Source§

impl Clone for SBFrame

Source§

fn clone(&self) -> SBFrame

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SBFrame

Source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for SBFrame

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for SBFrame

Source§

impl Sync for SBFrame

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.