Skip to content

Commit 633d416

Browse files
committed
Print panic!() info to Dolphin’s HLE
This has the same limitation as println!(), it works only in Dolphin until rust-wii#9 gets merged.
1 parent 30e792e commit 633d416

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

luma_runtime/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
#![no_std]
88
#![feature(asm_experimental_arch, lang_items, alloc_error_handler)]
99

10+
extern crate alloc;
11+
1012
use core::arch::global_asm;
1113
use core::{alloc::Layout, panic::PanicInfo};
1214
use linked_list_allocator::LockedHeap;
1315
#[allow(unused_imports)]
1416
use luma_core::cache::*;
17+
use luma_core::println;
1518

1619
// Import linker symbols for allocator initialization.
1720
extern "C" {
@@ -66,7 +69,8 @@ impl Termination for () {}
6669
/// This function is called on panic.
6770
#[cfg_attr(not(test), panic_handler)]
6871
#[no_mangle]
69-
fn panic(_info: &PanicInfo) -> ! {
72+
fn panic(info: &PanicInfo) -> ! {
73+
println!("{}", info);
7074
loop {}
7175
}
7276

0 commit comments

Comments
 (0)