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",
|
"rustc-demangle",
|
||||||
"std-object",
|
"std-object",
|
||||||
] }
|
] }
|
||||||
|
colored = "2"
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
|
|
@ -2,6 +2,7 @@ use std::{fs, path::PathBuf};
|
||||||
|
|
||||||
use addr2line::{gimli, object};
|
use addr2line::{gimli, object};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
|
use colored::Colorize;
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
|
@ -65,7 +66,12 @@ fn print_address(ctx: &addr2line::Context<impl gimli::Reader>, address: u64) ->
|
||||||
})
|
})
|
||||||
.unwrap_or_default();
|
.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(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue