mirror of
https://github.com/fluencelabs/wasmer
synced 2025-03-17 08:40:50 +00:00
fault, state: Cleanup and keep consistent with backend.
This commit is contained in:
parent
57615e5673
commit
4d7eec10e9
@ -305,7 +305,6 @@ extern "C" fn signal_trap_handler(
|
||||
std::slice::from_raw_parts(ip as *const u8, magic_size),
|
||||
) {
|
||||
match ib.ty {
|
||||
InlineBreakpointType::Trace => {}
|
||||
InlineBreakpointType::Middleware => {
|
||||
let out: Option<Result<(), Box<dyn Any + Send>>> =
|
||||
with_breakpoint_map(|bkpt_map| {
|
||||
@ -321,7 +320,6 @@ extern "C" fn signal_trap_handler(
|
||||
unwind_result = e;
|
||||
}
|
||||
}
|
||||
_ => println!("Unknown breakpoint type: {:?}", ib.ty),
|
||||
}
|
||||
|
||||
fault.ip.set(ip + magic_size);
|
||||
@ -464,10 +462,7 @@ pub struct FaultInfo {
|
||||
impl FaultInfo {
|
||||
/// Parses the stack and builds an execution state image.
|
||||
pub unsafe fn read_stack(&self, max_depth: Option<usize>) -> Option<ExecutionStateImage> {
|
||||
let rsp = match self.known_registers[X64Register::GPR(GPR::RSP).to_index().0] {
|
||||
Some(x) => x,
|
||||
None => return None,
|
||||
};
|
||||
let rsp = self.known_registers[X64Register::GPR(GPR::RSP).to_index().0]?;
|
||||
|
||||
Some(CURRENT_CODE_VERSIONS.with(|versions| {
|
||||
let versions = versions.borrow();
|
||||
|
@ -1063,7 +1063,6 @@ pub mod x64 {
|
||||
let mut is_baseline: Option<bool> = None;
|
||||
|
||||
for version in versions() {
|
||||
//println!("Lookup IP: {:x}", ret_addr);
|
||||
match version
|
||||
.msm
|
||||
.lookup_call_ip(ret_addr as usize, version.base)
|
||||
@ -1251,7 +1250,6 @@ pub mod x64 {
|
||||
stack: wasm_stack,
|
||||
locals: wasm_locals,
|
||||
};
|
||||
//println!("WFS = {:?}", wfs);
|
||||
results.push(wfs);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user