From 2e532fa66da1c15bf66bdf9972a019b3fed1335f Mon Sep 17 00:00:00 2001 From: losfair Date: Mon, 14 Oct 2019 20:23:27 +0800 Subject: [PATCH] Preserve fault.ip when calling middleware. --- lib/runtime-core/src/fault.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime-core/src/fault.rs b/lib/runtime-core/src/fault.rs index ae0bf65c9..b2b7a415d 100644 --- a/lib/runtime-core/src/fault.rs +++ b/lib/runtime-core/src/fault.rs @@ -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;