mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-30 17:11:33 +00:00
Debugging LLVM trap code WIP
This commit is contained in:
@ -52,8 +52,6 @@ extern "C" {
|
||||
fn throw_trap(ty: i32) -> !;
|
||||
fn throw_breakpoint(ty: i64) -> !;
|
||||
|
||||
/// This should be the same as spliting up the fat pointer into two arguments,
|
||||
/// but this is cleaner, I think?
|
||||
#[cfg_attr(nightly, unwind(allowed))]
|
||||
#[allow(improper_ctypes)]
|
||||
fn throw_runtime_error(data: *mut Option<RuntimeError>) -> !;
|
||||
|
@ -944,8 +944,10 @@ pub unsafe extern "C" fn callback_trampoline(
|
||||
b: *mut Option<RuntimeError>,
|
||||
callback: *mut BreakpointHandler,
|
||||
) {
|
||||
dbg!("In llvm's callback_trampoline");
|
||||
let callback = Box::from_raw(callback);
|
||||
let result: Result<(), RuntimeError> = callback(BreakpointInfo { fault: None });
|
||||
dbg!(&*b);
|
||||
match result {
|
||||
Ok(()) => *b = None,
|
||||
Err(e) => *b = Some(e),
|
||||
|
Reference in New Issue
Block a user