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>
impl<'a> FrameTable<'a>
Sourcepub fn parse(data: &'a [u8]) -> Result<FrameTable<'a>>
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
].
Sourcepub fn frame_descriptor(
&self,
frame_descriptor: FrameTableDescriptorIndex,
) -> Option<(&'a [u8], u32)>
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.
Sourcepub fn find_program_point(
&self,
search_pc: u32,
search_pos: FrameInstPos,
) -> Option<impl Iterator<Item = (u32, FrameTableDescriptorIndex, FrameStackShape)>>
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).
Sourcepub fn into_program_points(
self,
) -> impl Iterator<Item = (u32, FrameInstPos, Vec<(u32, FrameTableDescriptorIndex, FrameStackShape)>)> + 'a
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more