FrameTable

Struct FrameTable 

Source
pub struct FrameTable<'a> { /* private fields */ }
Expand description

A parser for a frame-table section.

This parser holds slices to the in-memory section data, and is cheap to construct: it reads some header fields but does not interpret or validate content data until queried.

Implementations§

Source§

impl<'a> FrameTable<'a>

Source

pub fn parse(data: &'a [u8]) -> Result<FrameTable<'a>>

Parse a frame table section from a byte-slice as produced by [crate::compile::frame_table::FrameTableBuilder].

Source

pub fn frame_descriptor( &self, frame_descriptor: FrameTableDescriptorIndex, ) -> Option<(&'a [u8], u32)>

Get raw frame descriptor data and slot-to-FP-offset for a given frame descriptor.

Source

pub fn find_program_point( &self, search_pc: u32, search_pos: FrameInstPos, ) -> Option<impl Iterator<Item = (u32, FrameTableDescriptorIndex, FrameStackShape)>>

Get frames for the program point at the PC upper-bounded by a given search PC (offset in text section).

Source

pub fn into_program_points( self, ) -> impl Iterator<Item = (u32, FrameInstPos, Vec<(u32, FrameTableDescriptorIndex, FrameStackShape)>)> + 'a

Get all program point records with iterators over corresponding frames for each.

Auto Trait Implementations§

§

impl<'a> Freeze for FrameTable<'a>

§

impl<'a> RefUnwindSafe for FrameTable<'a>

§

impl<'a> Send for FrameTable<'a>

§

impl<'a> Sync for FrameTable<'a>

§

impl<'a> Unpin for FrameTable<'a>

§

impl<'a> UnwindSafe for FrameTable<'a>

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> 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, 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.