Preserve fault.ip when calling middleware.

This commit is contained in:
losfair 2019-10-14 20:23:27 +08:00
parent a525907c60
commit 2e532fa66d

View File

@ -272,8 +272,6 @@ extern "C" fn signal_trap_handler(
v.backend,
std::slice::from_raw_parts(ip as *const u8, magic_size),
) {
fault.ip.set(ip + magic_size);
match ib.ty {
InlineBreakpointType::Trace => {}
InlineBreakpointType::Middleware => {
@ -292,6 +290,8 @@ extern "C" fn signal_trap_handler(
}
_ => println!("Unknown breakpoint type: {:?}", ib.ty),
}
fault.ip.set(ip + magic_size);
return true;
}
break;