Skip to content

Commit

Permalink
Print panic!() info to Dolphin’s HLE
Browse files Browse the repository at this point in the history
This has the same limitation as println!(), it works only in Dolphin
until rust-wii#9 gets merged.
  • Loading branch information
linkmauve committed Dec 19, 2021
1 parent 30e792e commit 633d416
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion luma_runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@
#![no_std]
#![feature(asm_experimental_arch, lang_items, alloc_error_handler)]

extern crate alloc;

use core::arch::global_asm;
use core::{alloc::Layout, panic::PanicInfo};
use linked_list_allocator::LockedHeap;
#[allow(unused_imports)]
use luma_core::cache::*;
use luma_core::println;

// Import linker symbols for allocator initialization.
extern "C" {
Expand Down Expand Up @@ -66,7 +69,8 @@ impl Termination for () {}
/// This function is called on panic.
#[cfg_attr(not(test), panic_handler)]
#[no_mangle]
fn panic(_info: &PanicInfo) -> ! {
fn panic(info: &PanicInfo) -> ! {
println!("{}", info);
loop {}
}

Expand Down

0 comments on commit 633d416

Please sign in to comment.