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