1*be691f3bSpatrickinclude "llvm/Option/OptParser.td" 2*be691f3bSpatrick 3*be691f3bSpatrickclass F<string name>: Flag<["--", "-"], name>; 4*be691f3bSpatrickclass R<list<string> prefixes, string name> 5*be691f3bSpatrick : Option<prefixes, name, KIND_REMAINING_ARGS>; 6*be691f3bSpatrick 7*be691f3bSpatrickmulticlass SJ<string name, string help> { 8*be691f3bSpatrick def NAME: Separate<["--", "-"], name>, 9*be691f3bSpatrick HelpText<help>; 10*be691f3bSpatrick def NAME # _eq: Joined<["--", "-"], name # "=">, 11*be691f3bSpatrick Alias<!cast<Separate>(NAME)>; 12*be691f3bSpatrick} 13*be691f3bSpatrick 14*be691f3bSpatrickdef grp_connect : OptionGroup<"connection">, HelpText<"CONNECTION">; 15*be691f3bSpatrick 16*be691f3bSpatrickdefm fd: SJ<"fd", "Communicate over the given file descriptor.">, 17*be691f3bSpatrick MetaVarName<"<fd>">, 18*be691f3bSpatrick Group<grp_connect>; 19*be691f3bSpatrick 20*be691f3bSpatrickdefm named_pipe: SJ<"named-pipe", "Write port lldb-server will listen on to the given named pipe.">, 21*be691f3bSpatrick MetaVarName<"<name>">, 22*be691f3bSpatrick Group<grp_connect>; 23*be691f3bSpatrick 24*be691f3bSpatrickdefm pipe: SJ<"pipe", "Write port lldb-server will listen on to the given file descriptor.">, 25*be691f3bSpatrick MetaVarName<"<fd>">, 26*be691f3bSpatrick Group<grp_connect>; 27*be691f3bSpatrick 28*be691f3bSpatrickdef reverse_connect: F<"reverse-connect">, 29*be691f3bSpatrick HelpText<"Connect to the client instead of passively waiting for a connection. In this case [host]:port denotes the remote address to connect to.">, 30*be691f3bSpatrick Group<grp_connect>; 31*be691f3bSpatrick 32*be691f3bSpatrickdef grp_general : OptionGroup<"general options">, HelpText<"GENERAL OPTIONS">; 33*be691f3bSpatrick 34*be691f3bSpatrickdefm 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*be691f3bSpatrick MetaVarName<"<channel1 categories...:channel2 categories...>">, 36*be691f3bSpatrick Group<grp_general>; 37*be691f3bSpatrick 38*be691f3bSpatrickdefm log_file: SJ<"log-file", "Destination file to log to. If empty, log to stderr.">, 39*be691f3bSpatrick MetaVarName<"<file>">, 40*be691f3bSpatrick Group<grp_general>; 41*be691f3bSpatrick 42*be691f3bSpatrickdef setsid: F<"setsid">, HelpText<"Run lldb-server in a new session.">, 43*be691f3bSpatrick Group<grp_general>; 44*be691f3bSpatrickdef: Flag<["-"], "S">, Alias<setsid>, 45*be691f3bSpatrick Group<grp_general>; 46*be691f3bSpatrick 47*be691f3bSpatrickdef help: F<"help">, HelpText<"Prints out the usage information for lldb-server.">, 48*be691f3bSpatrick Group<grp_general>; 49*be691f3bSpatrickdef: Flag<["-"], "h">, Alias<help>, 50*be691f3bSpatrick Group<grp_general>; 51*be691f3bSpatrick 52*be691f3bSpatrickdef grp_target : OptionGroup<"target selection">, HelpText<"TARGET SELECTION">; 53*be691f3bSpatrick 54*be691f3bSpatrickdefm attach: SJ<"attach", "Attach to the process given by a (numeric) process id or a name.">, 55*be691f3bSpatrick MetaVarName<"<pid-or-name>">, 56*be691f3bSpatrick Group<grp_target>; 57*be691f3bSpatrick 58*be691f3bSpatrickdef REM : R<["--"], "">, HelpText<"Launch program for debugging.">, 59*be691f3bSpatrick MetaVarName<"program args">, 60*be691f3bSpatrick Group<grp_target>; 61*be691f3bSpatrick 62*be691f3bSpatrickdef: F<"native-regs">; // Noop. Present for backwards compatibility only. 63