use core::fmt;

use ::xen::sched::crash;

#[cfg(not(test))]
#[lang = "stack_exhausted"]
pub fn stack_exhausted() -> ! {
    unimplemented!()
}

#[cfg(not(test))]
#[lang = "eh_personality"]
pub fn eh_personality() -> ! {
    unimplemented!()
}

#[cfg(not(test))]
#[lang = "panic_fmt"]
pub extern fn panic_impl(msg: fmt::Arguments, file: &'static str, line: u32) {
    println!("Panic at '{}:{}' with message '{}'", file, line, msg);
    ::xen::console::console().flush();

    crash();

    loop {}
}

#[no_mangle]
#[allow(non_snake_case)]
pub fn _Unwind_Resume(_: *mut u8) -> ! {
    panic!("_Unwind_Resume called");
}

use core::fmt;

use ::xen::sched::crash;

#[cfg(not(test))]
#[lang = "stack_exhausted"]
pub fn stack_exhausted() -> ! {
    unimplemented!()
}

#[cfg(not(test))]
#[lang = "eh_personality"]
pub fn eh_personality() -> ! {
    unimplemented!()
}

#[cfg(not(test))]
#[lang = "panic_fmt"]
pub extern fn panic_impl(msg: fmt::Arguments, file: &'static str, line: u32) {
    println!("Panic at '{}:{}' with message '{}'", file, line, msg);
    ::xen::console::console().flush();

    crash();

    loop {}
}

--- 
+++ 
@@ -24,3 +24,9 @@
 
     loop {}
 }
+
+#[no_mangle]
+#[allow(non_snake_case)]
+pub fn _Unwind_Resume(_: *mut u8) -> ! {
+    panic!("_Unwind_Resume called");
+}
utils: Add dummy implementation of _Unwind_Resume
