diff options
| author | Santo Cariotti <santo@dcariotti.me> | 2023-10-16 13:46:48 +0200 | 
|---|---|---|
| committer | Santo Cariotti <santo@dcariotti.me> | 2023-10-16 13:46:48 +0200 | 
| commit | c7d99a1dff61d64ffc26caa8068cf41d5202af3b (patch) | |
| tree | d704cf4234a38aa632f2b9066ad08da1489fca46 /src/cli.rs | |
| parent | f9207a326c7f0e5861ee9489313861fdcd7bbff0 (diff) | |
Trace attaching a pid
Diffstat (limited to 'src/cli.rs')
| -rw-r--r-- | src/cli.rs | 22 | 
1 files changed, 22 insertions, 0 deletions
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<String>, + +    /// 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<i32>, + +    /// Write the output to a file instead of the standard output +    #[arg(short = 'f', long = "file")] +    pub file_to_print: Option<String>, + +    /// If defined, it hides the TUI +    #[arg(long = "no-tui", default_value_t = false)] +    pub no_tui: bool, +}  |