mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Slightly prettier output
This commit is contained in:
parent
3f374f3e9c
commit
726b400463
|
@ -14,6 +14,7 @@ addr2line = { version = "0.21", default-features = false, features = [
|
|||
"rustc-demangle",
|
||||
"std-object",
|
||||
] }
|
||||
colored = "2"
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 3
|
||||
|
|
|
@ -2,6 +2,7 @@ use std::{fs, path::PathBuf};
|
|||
|
||||
use addr2line::{gimli, object};
|
||||
use clap::Parser;
|
||||
use colored::Colorize;
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
|
@ -65,7 +66,12 @@ fn print_address(ctx: &addr2line::Context<impl gimli::Reader>, address: u64) ->
|
|||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
println!("{function_name} ({}:{})", location.filename, location.line);
|
||||
println!(
|
||||
"{}\n\t{}:{}",
|
||||
function_name.white(),
|
||||
location.filename.green(),
|
||||
location.line.to_string().green()
|
||||
);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in a new issue