From b54926134c984defc24953b1fad2418026a71009 Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 15 May 2018 14:33:30 +0000 Subject: [PATCH] firmware: update the signature of #[lang="panic_fmt"]. --- artiq/firmware/bootloader/main.rs | 5 +++-- artiq/firmware/ksupport/lib.rs | 5 +++-- artiq/firmware/runtime/main.rs | 5 +++-- artiq/firmware/satman/main.rs | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/artiq/firmware/bootloader/main.rs b/artiq/firmware/bootloader/main.rs index 398731e99..4498140b4 100644 --- a/artiq/firmware/bootloader/main.rs +++ b/artiq/firmware/bootloader/main.rs @@ -228,7 +228,8 @@ pub extern fn abort() { #[no_mangle] #[lang = "panic_fmt"] -pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { - println!("panic at {}:{}: {}", file, line, args); +pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, + line: u32, column: u32) -> ! { + println!("panic at {}:{}:{}: {}", file, line, column, args); loop {} } diff --git a/artiq/firmware/ksupport/lib.rs b/artiq/firmware/ksupport/lib.rs index e2f7696a2..c3e05c138 100644 --- a/artiq/firmware/ksupport/lib.rs +++ b/artiq/firmware/ksupport/lib.rs @@ -49,8 +49,9 @@ macro_rules! recv { #[no_mangle] #[lang = "panic_fmt"] -pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { - send(&Log(format_args!("panic at {}:{}: {}\n", file, line, args))); +pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, + line: u32, column: u32) -> ! { + send(&Log(format_args!("panic at {}:{}:{}: {}\n", file, line, column, args))); send(&RunAborted); loop {} } diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index deb78bf97..2f075b573 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -303,8 +303,9 @@ pub extern fn abort() { #[no_mangle] #[lang = "panic_fmt"] -pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { - println!("panic at {}:{}: {}", file, line, args); +pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, + line: u32, column: u32) -> ! { + println!("panic at {}:{}:{}: {}", file, line, column, args); println!("backtrace for software version {}:", include_str!(concat!(env!("OUT_DIR"), "/git-describe"))); diff --git a/artiq/firmware/satman/main.rs b/artiq/firmware/satman/main.rs index faa343678..eb478cc6a 100644 --- a/artiq/firmware/satman/main.rs +++ b/artiq/firmware/satman/main.rs @@ -293,7 +293,8 @@ pub extern fn abort() { #[no_mangle] #[lang = "panic_fmt"] -pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { - println!("panic at {}:{}: {}", file, line, args); +pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, + line: u32, column: u32) -> ! { + println!("panic at {}:{}:{}: {}", file, line, column, args); loop {} }