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], original_text: &'a [u8]) -> Result<FrameTable<'a>>
pub fn parse(data: &'a [u8], original_text: &'a [u8]) -> Result<FrameTable<'a>>
Parse a frame table section from a byte-slice as produced by
crate::compile::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 = (ModulePC, FrameTableDescriptorIndex, FrameStackShape)>>
pub fn find_program_point( &self, search_pc: u32, search_pos: FrameInstPos, ) -> Option<impl Iterator<Item = (ModulePC, 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<(ModulePC, FrameTableDescriptorIndex, FrameStackShape)>)> + 'a
pub fn into_program_points( self, ) -> impl Iterator<Item = (u32, FrameInstPos, Vec<(ModulePC, FrameTableDescriptorIndex, FrameStackShape)>)> + 'a
Get all program point records with iterators over corresponding frames for each.
Sourcepub fn lookup_breakpoint_patches_by_pc(
&self,
pc: ModulePC,
) -> impl Iterator<Item = FrameTableBreakpointData<'_>> + '_
pub fn lookup_breakpoint_patches_by_pc( &self, pc: ModulePC, ) -> impl Iterator<Item = FrameTableBreakpointData<'_>> + '_
Find a list of breakpoint patches for a given Wasm PC.
Sourcepub fn nearest_breakpoint(&self, pc: ModulePC) -> Option<ModulePC>
pub fn nearest_breakpoint(&self, pc: ModulePC) -> Option<ModulePC>
Find the nearest breakpoint PC at or after the given PC.
Sourcepub fn breakpoint_patches(
&self,
) -> impl Iterator<Item = (ModulePC, FrameTableBreakpointData<'_>)> + '_
pub fn breakpoint_patches( &self, ) -> impl Iterator<Item = (ModulePC, FrameTableBreakpointData<'_>)> + '_
Return an iterator over all breakpoint patches.
Returned tuples are (module-relative Wasm PC, breakpoint data).