use wasm_encoder::CoreDumpValue;
use crate::{Backtrace, VMRuntimeLimits};
use super::CallThreadState;
#[derive(Debug)]
pub struct CoreDumpStack {
pub bt: Backtrace,
pub locals: Vec<Vec<CoreDumpValue>>,
pub operand_stack: Vec<Vec<CoreDumpValue>>,
}
impl CoreDumpStack {
pub fn new(
cts: &CallThreadState,
limits: *const VMRuntimeLimits,
trap_pc_and_fp: Option<(usize, usize)>,
) -> Self {
let bt = unsafe { Backtrace::new_with_trap_state(limits, cts, trap_pc_and_fp) };
Self {
bt,
locals: vec![],
operand_stack: vec![],
}
}
}