From c7d99a1dff61d64ffc26caa8068cf41d5202af3b Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 16 Oct 2023 13:46:48 +0200 Subject: Trace attaching a pid --- src/cli.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/cli.rs (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 0000000..685b26f --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,22 @@ +use clap::Parser; + +#[derive(Parser)] +#[command(author, version, about, long_about = None)] +pub struct Args { + /// Command to execute from ptrace + #[arg(short, long)] + pub command: Option, + + /// Attach the tracing to an existing process ID. We're using the `-p` short flag because + /// strace uses it + #[arg(short = 'p', long)] + pub attach: Option, + + /// Write the output to a file instead of the standard output + #[arg(short = 'f', long = "file")] + pub file_to_print: Option, + + /// If defined, it hides the TUI + #[arg(long = "no-tui", default_value_t = false)] + pub no_tui: bool, +} -- cgit v1.2.3-18-g5258