in idb/cli/commands/xctrace.py [0:0]
def add_parser_arguments(self, parser: ArgumentParser) -> None:
# Options from official 'xctrace record'
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument(
"--all-processes",
help="Record all processes",
action="store_true",
default=False,
)
group.add_argument(
"--attach",
help="Attach and record process with the given name or pid",
metavar="<pid|name>",
type=str,
)
group.add_argument(
"--launch",
type=str,
metavar="command",
help="Launch process with the given name or path",
)
parser.add_argument(
"--output",
help="Output .trace file to the given path on the client host",
type=str,
)
parser.add_argument(
"--append-run",
help="Not implemented",
action="store_true",
default=False,
)
parser.add_argument(
"--template",
help="Record using given trace template name or path",
metavar="<path|name>",
required=True,
type=str,
)
parser.add_argument(
"--device",
help="Not implemented",
metavar="<name|UDID>",
type=str,
)
parser.add_argument(
"--time-limit",
help="Limit recording time to the specified value",
metavar="<time[ms|s|m|h]>",
type=str,
)
parser.add_argument(
"--package",
help="Load Instruments Package from given path for duration of the command",
metavar="<file>",
type=str,
)
parser.add_argument(
"launch_args",
nargs="*",
default=[],
metavar="argument",
help="Launch process with the given arguments",
)
parser.add_argument(
"--target-stdin",
help="Redirect standard input of the launched process",
metavar="<name>",
type=str,
)
parser.add_argument(
"--target-stdout",
help="Redirect standard output of the launched process",
metavar="<name>",
type=str,
)
parser.add_argument(
"--env",
nargs=1,
default={},
action=KeyValueDictAppendAction,
metavar="<VAR=value>",
help="Set specified environment variable for the launched process",
)
# FB options
parser.add_argument(
"--stop-timeout",
metavar="<time[ms|s|m|h]>",
type=str,
help="Timeout for stopping the recording",
)
parser.add_argument(
"--post-args",
nargs="*",
default=[],
help="Post processing arguments to process the .trace file",
)
super().add_parser_arguments(parser)