Provide the way to override the panic handler.

This commit is contained in:
Zhang Junyang
2024-09-25 18:04:44 +08:00
committed by Tate, Hongliang Tian
parent 3c857d746e
commit 131a25c15c
12 changed files with 129 additions and 74 deletions

View File

@ -6,7 +6,7 @@ extern crate #TARGET_NAME#;
#[panic_handler]
fn panic(info: &core::panic::PanicInfo) -> ! {
extern "Rust" {
pub fn __aster_panic_handler(info: &core::panic::PanicInfo) -> !;
pub fn __ostd_panic_handler(info: &core::panic::PanicInfo) -> !;
}
unsafe { __aster_panic_handler(info); }
unsafe { __ostd_panic_handler(info); }
}