From d435142d3cda134760cc4ad33e773a650670c774 Mon Sep 17 00:00:00 2001 From: grdddj Date: Thu, 30 Mar 2023 18:38:22 +0200 Subject: [PATCH] rust: print filename:lineno in case of fatal error --- core/embed/rust/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/embed/rust/src/lib.rs b/core/embed/rust/src/lib.rs index 0edae7d190..f3b9db28c5 100644 --- a/core/embed/rust/src/lib.rs +++ b/core/embed/rust/src/lib.rs @@ -39,6 +39,9 @@ fn panic_debug(panic_info: &core::panic::PanicInfo) -> ! { if let Some(location) = panic_info.location() { let file = location.file(); + print!(file); + print!(":"); + println!(inttostr!(location.line())); trezorhal::fatal_error::__fatal_error("", "rs", file, location.line(), ""); } else { trezorhal::fatal_error::__fatal_error("", "rs", "", 0, "");