ft: add dump flag
This commit is contained in:
@@ -28,6 +28,10 @@ struct Args {
|
||||
/// Path of the binary
|
||||
#[arg(short, long, global = true)]
|
||||
path: Option<String>,
|
||||
|
||||
/// Dump progress of disassembly, in case of encountering an error.
|
||||
#[arg(short, long, global = true, action)]
|
||||
dump: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
@@ -39,7 +43,7 @@ fn main() {
|
||||
match args.command {
|
||||
Command::Disasm => {
|
||||
let mut disasm = Disassembler::new(&args);
|
||||
let instructions = disasm.disassemble();
|
||||
let instructions = disasm.disassemble(args.dump);
|
||||
match instructions {
|
||||
Ok(instrs) => instrs.iter().for_each(|i| println!("{i}")),
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user