1 include "llvm/Option/OptParser.td"
3 class F<string name>: Flag<["--", "-"], name>;
4 class R<list<string> prefixes, string name>
5 : Option<prefixes, name, KIND_REMAINING_ARGS>;
7 multiclass SJ<string name, string help> {
8 def NAME: Separate<["--", "-"], name>,
10 def NAME # _eq: Joined<["--", "-"], name # "=">,
11 Alias<!cast<Separate>(NAME)>;
14 def grp_connect : OptionGroup<"connection">, HelpText<"CONNECTION">;
16 defm fd: SJ<"fd", "Communicate over the given file descriptor.">,
20 defm named_pipe: SJ<"named-pipe", "Write port lldb-server will listen on to the given named pipe.">,
21 MetaVarName<"<name>">,
24 defm pipe: SJ<"pipe", "Write port lldb-server will listen on to the given file descriptor.">,
28 def reverse_connect: F<"reverse-connect">,
29 HelpText<"Connect to the client instead of passively waiting for a connection. In this case [host]:port denotes the remote address to connect to.">,
32 def grp_general : OptionGroup<"general options">, HelpText<"GENERAL OPTIONS">;
34 defm log_channels: SJ<"log-channels", "Channels to log. A colon-separated list of entries. Each entry starts with a channel followed by a space-separated list of categories.">,
35 MetaVarName<"<channel1 categories...:channel2 categories...>">,
38 defm log_file: SJ<"log-file", "Destination file to log to. If empty, log to stderr.">,
39 MetaVarName<"<file>">,
42 def setsid: F<"setsid">, HelpText<"Run lldb-server in a new session.">,
44 def: Flag<["-"], "S">, Alias<setsid>,
47 def help: F<"help">, HelpText<"Prints out the usage information for lldb-server.">,
49 def: Flag<["-"], "h">, Alias<help>,
52 def grp_target : OptionGroup<"target selection">, HelpText<"TARGET SELECTION">;
54 defm attach: SJ<"attach", "Attach to the process given by a (numeric) process id or a name.">,
55 MetaVarName<"<pid-or-name>">,
58 def REM : R<["--"], "">, HelpText<"Launch program for debugging.">,
59 MetaVarName<"program args">,
62 def: F<"native-regs">; // Noop. Present for backwards compatibility only.