5 :
6 m_abi_constraint{getABIs()},
7 cmdline{"Command line process tracer.\nTo use clues as a front-end pass the command line to execute after '--'", ' ', "0.1"},
9 "p", "process",
10 "attach to the given already running process for tracing.",
11 false,
12 cosmos::to_integral(cosmos::ProcessID::INVALID),
13 "Process ID"},
15 "", "follow-execve",
16 "What to do upon execve() in a tracee: 'yes' (continue tracing; default), 'no' (detach from tracee), 'ask' (interactively ask what to do), 'path:<path>' (continue if new executable matches path), 'glob:<pattern>' (continue if new executable matches glob pattern).",
17 false,
18 "",
19 "configuration string"
20 },
22 "", "follow-children",
23 "What to do upon new child processes appearing via [v]fork() or clone(): 'yes' (automatically attach), 'no' (ignore; default), 'ask' (interactively ask what to do), 'threads' (only follow threads of the same process).",
24 false,
25 "",
26 "configuration string"
27 },
29 "", "threads",
30 "follow/attach all threads within the process. Do not follow fork(). synonym for '--follow-children threads'.",
31 false},
32
33
35 "f", "follow",
36 "synonym for '--follow-children yes'.",
37 false},
39 "1", "no-initial-threads-attach",
40 "when attaching to a running process, don't attach all of the process's threads, only the one specified via -p, even if --follow-children is set.",
41 false},
43 "", "fd-info",
44 "Print detailed information about file descriptors (e.g. type, path, etc.)",
45 false},
47 "v", "verbose",
48 "increase verbosity of tracing output",
49 false},
51 "s", "max-len",
52 "maximum length of parameter values to print. 0 to to print not at all, -1 to disable truncation.",
53 false,
54 64,
55 "number of bytes"},
57 "", "list-syscalls",
58 "list all known system calls names, then exit.",
59 false},
61 "", "list-abi-syscalls",
62 "list all system calls names and their numbers for the given system call ABI.",
63 false,
64 "",
65 &m_abi_constraint
66 },
68 "", "list-abis",
69 "list the names of system call ABIs supported on this system.",
70 false
71 },
73 "e", "filter",
74 "configuration of system call filters. comma separated list of system call names, optionally prefixed with '!' to negate the meaning.",
75 false,
76 "",
77 "comma separated list of system call names"} {
78
92}
TCLAP::SwitchArg list_syscalls
List system call names and their numbers.
TCLAP::ValueArg< std::string > follow_execve
Controls the behaviour upon execve().
TCLAP::SwitchArg list_abis
List supported system call ABIs.
TCLAP::ValueArg< std::string > follow_children
controls the behaviour upon clone()/fork().
TCLAP::SwitchArg print_fd_info
Print additional file descriptor information.
TCLAP::ValueArg< std::string > syscall_filter
Configure system calls which to trace.
TCLAP::SwitchArg no_initial_threads_attach
Don't attach all other threads even if follow_children_switch is set.
TCLAP::SwitchArg follow_threads
controls whether threads within the same process are followed.
TCLAP::SwitchArg follow_children_switch
Short form of 'follow_children yes'.
TCLAP::ValueArg< int > max_value_len
Maximum length of parameter values to print.
TCLAP::SwitchArg verbose
Increase verbosity of tracing output.
TCLAP::ValueArg< std::string > list_abi_syscalls
List ABI-specific system call names and their numbers.
TCLAP::ValueArg< std::underlying_type< cosmos::ProcessID >::type > attach_proc
Already running process to attach to.