forked from M-Labs/artiq
1
0
Fork 0

firmware: update the signature of #[lang="panic_fmt"].

This commit is contained in:
whitequark 2018-05-15 14:33:30 +00:00
parent c18a73d45f
commit b54926134c
4 changed files with 12 additions and 8 deletions

View File

@ -228,7 +228,8 @@ pub extern fn abort() {
#[no_mangle] #[no_mangle]
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str,
println!("panic at {}:{}: {}", file, line, args); line: u32, column: u32) -> ! {
println!("panic at {}:{}:{}: {}", file, line, column, args);
loop {} loop {}
} }

View File

@ -49,8 +49,9 @@ macro_rules! recv {
#[no_mangle] #[no_mangle]
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str,
send(&Log(format_args!("panic at {}:{}: {}\n", file, line, args))); line: u32, column: u32) -> ! {
send(&Log(format_args!("panic at {}:{}:{}: {}\n", file, line, column, args)));
send(&RunAborted); send(&RunAborted);
loop {} loop {}
} }

View File

@ -303,8 +303,9 @@ pub extern fn abort() {
#[no_mangle] #[no_mangle]
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str,
println!("panic at {}:{}: {}", file, line, args); line: u32, column: u32) -> ! {
println!("panic at {}:{}:{}: {}", file, line, column, args);
println!("backtrace for software version {}:", println!("backtrace for software version {}:",
include_str!(concat!(env!("OUT_DIR"), "/git-describe"))); include_str!(concat!(env!("OUT_DIR"), "/git-describe")));

View File

@ -293,7 +293,8 @@ pub extern fn abort() {
#[no_mangle] #[no_mangle]
#[lang = "panic_fmt"] #[lang = "panic_fmt"]
pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str, line: u32) -> ! { pub extern fn panic_fmt(args: core::fmt::Arguments, file: &'static str,
println!("panic at {}:{}: {}", file, line, args); line: u32, column: u32) -> ! {
println!("panic at {}:{}:{}: {}", file, line, column, args);
loop {} loop {}
} }