mirror of
https://github.com/encounter/ppc750cl.git
synced 2025-07-13 16:46:10 +00:00
flow-graph: fix deprecated clap_app macro
This commit is contained in:
parent
4c5735e403
commit
6391c87797
@ -1,4 +1,3 @@
|
|||||||
use clap::clap_app;
|
|
||||||
use petgraph::dot::{Config as DotConfig, Dot};
|
use petgraph::dot::{Config as DotConfig, Dot};
|
||||||
|
|
||||||
use ppc750cl::{disasm_iter, Ins};
|
use ppc750cl::{disasm_iter, Ins};
|
||||||
@ -11,14 +10,29 @@ use crate::slices::BasicSlices;
|
|||||||
use dol::Dol;
|
use dol::Dol;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let matches = clap_app!(myapp =>
|
let matches = clap::Command::new("ppc750cl-flow-graph")
|
||||||
(version: "1.0")
|
.version("0.1.1")
|
||||||
(about: "Control flow graph analysis for PowerPC 750CL")
|
.about("Control flow graph analysis for PowerPC 750CL")
|
||||||
(@arg START: --start +required +takes_value "Start address")
|
.arg(
|
||||||
(@arg STOP: --stop +required +takes_value "Stop address")
|
clap::Arg::new("START")
|
||||||
(@arg INPUT: +required "Binary input file")
|
.long("--start")
|
||||||
)
|
.required(true)
|
||||||
.get_matches();
|
.takes_value(true)
|
||||||
|
.help("Start address"),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
clap::Arg::new("STOP")
|
||||||
|
.long("--stop")
|
||||||
|
.required(true)
|
||||||
|
.takes_value(true)
|
||||||
|
.help("Stop address"),
|
||||||
|
)
|
||||||
|
.arg(
|
||||||
|
clap::Arg::new("INPUT")
|
||||||
|
.required(true)
|
||||||
|
.help("Binary input file"),
|
||||||
|
)
|
||||||
|
.get_matches();
|
||||||
|
|
||||||
let start_addr = matches.value_of("START").unwrap();
|
let start_addr = matches.value_of("START").unwrap();
|
||||||
let start_addr: u32 = ::parse_int::parse(start_addr).expect("Invalid address flag");
|
let start_addr: u32 = ::parse_int::parse(start_addr).expect("Invalid address flag");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user