pub struct FrameTableBuilder { /* private fields */ }Expand description
Builder for the Frame Table.
Format:
num_slot_descriptors: u32num_progpoints: u32num_breakpoints: u32frame_descriptor_pool_length: u32progpoint_descriptor_pool_length: u32breakpoint_patch_pool_length: u32num_slot_descriptorstimes:- frame descriptor offset: u32
- length: u32
num_slot_descriptorstimes:- offset from frame up to FP: u32
num_progpointstimes:- PC, from start of text section, position (post/pre): u32
- encoded as (pc << 1) | post_pre_bit
- PC, from start of text section, position (post/pre): u32
num_progpointstimes:- progpoint descriptor offset: u32
num_breakpointstimes:- Wasm PC: u32 (sorted order; may repeat)
num_breakpointstimes:- patch offset in text: u32
num_breakpointstimes:- end of breakpoint patch data in pool: u32 (find the start by end of previous; patches are in the pool in order and this saves storing redundant start/end values)
- frame descriptors (format described above;
frame_descriptor_pool_lengthbytes) - progpoint descriptors (
progpoint_descriptor_pool_lengthbytes)- each descriptor: sequence of frames
- Wasm PC: u32 (high bit set to indicate a parent frame)
- slot descriptor index: u32
- stack shape index: u32 (or u32::MAX for none)
- each descriptor: sequence of frames
- breakpoint patch pool (
breakpoint_patch_pool_lengthbytes)- freeform slices of machine-code bytes to patch in
Implementations§
Source§impl FrameTableBuilder
impl FrameTableBuilder
Sourcepub fn add_frame_descriptor(
&mut self,
slot_to_fp_offset: u32,
data: &[u8],
) -> FrameTableDescriptorIndex
pub fn add_frame_descriptor( &mut self, slot_to_fp_offset: u32, data: &[u8], ) -> FrameTableDescriptorIndex
Add one frame descriptor.
Returns the frame descriptor index.
Sourcepub fn add_program_point(
&mut self,
native_pc: u32,
pos: FrameInstPos,
frames: &[(u32, FrameTableDescriptorIndex, FrameStackShape)],
)
pub fn add_program_point( &mut self, native_pc: u32, pos: FrameInstPos, frames: &[(u32, FrameTableDescriptorIndex, FrameStackShape)], )
Add one program point.
Sourcepub fn add_breakpoint_patch(
&mut self,
wasm_pc: u32,
patch_start_native_pc: u32,
patch: &[u8],
)
pub fn add_breakpoint_patch( &mut self, wasm_pc: u32, patch_start_native_pc: u32, patch: &[u8], )
Add one breakpoint patch.
Trait Implementations§
Source§impl Default for FrameTableBuilder
impl Default for FrameTableBuilder
Source§fn default() -> FrameTableBuilder
fn default() -> FrameTableBuilder
Returns the “default value” for a type. Read more