76 lines · plain
1include "llvm/Option/OptParser.td"2 3class F<string name>: Flag<["--", "-"], name>;4class R<list<string> prefixes, string name>5 : Option<prefixes, name, KIND_REMAINING_ARGS>;6 7multiclass SJ<string name, string help> {8 def NAME: Separate<["--", "-"], name>,9 HelpText<help>;10 def NAME # _eq: Joined<["--", "-"], name # "=">,11 Alias<!cast<Separate>(NAME)>;12}13 14def grp_connect : OptionGroup<"connection">, HelpText<"CONNECTION OPTIONS">;15 16defm listen: SJ<"listen", "Host and port to listen on. Format: [host]:port or protocol://[host]:port (e.g., tcp://localhost:1234, unix:///path/to/socket). Short form: -L">,17 MetaVarName<"<[host]:port>">,18 Group<grp_connect>;19def: Separate<["-"], "L">, Alias<listen>,20 Group<grp_connect>;21 22defm socket_file: SJ<"socket-file", "Write listening socket information (port number for TCP or path for Unix domain sockets) to the specified file. Short form: -f">,23 MetaVarName<"<path>">,24 Group<grp_connect>;25def: Separate<["-"], "f">, Alias<socket_file>,26 Group<grp_connect>;27 28defm gdbserver_port: SJ<"gdbserver-port", "Port to use for spawned gdbserver instances. If 0 or unspecified, a port will be chosen automatically. Short form: -P">,29 MetaVarName<"<port>">,30 Group<grp_connect>;31def: Separate<["-"], "P">, Alias<gdbserver_port>,32 Group<grp_connect>;33 34defm child_platform_fd: SJ<"child-platform-fd", "File descriptor for communication with parent platform process (internal use only).">,35 MetaVarName<"<fd>">,36 Group<grp_connect>,37 Flags<[HelpHidden]>;38 39def grp_general : OptionGroup<"general options">, HelpText<"GENERAL OPTIONS">;40 41def server: F<"server">,42 HelpText<"Run in server mode, accepting multiple client connections sequentially. Without this flag, the server exits after handling the first connection.">,43 Group<grp_general>;44 45defm 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. Common channels: lldb, gdb-remote, platform, process. Short form: -c">,46 MetaVarName<"<channel1 categories...:channel2 categories...>">,47 Group<grp_general>;48def: Separate<["-"], "c">, Alias<log_channels>,49 Group<grp_general>;50 51defm log_file: SJ<"log-file", "Destination file to log to. If empty, log to stderr. Short form: -l">,52 MetaVarName<"<file>">,53 Group<grp_general>;54def: Separate<["-"], "l">, Alias<log_file>,55 Group<grp_general>;56 57def debug: F<"debug">,58 HelpText<"(Unused, kept for backward compatibility)">,59 Group<grp_general>,60 Flags<[HelpHidden]>;61 62def verbose: F<"verbose">,63 HelpText<"(Unused, kept for backward compatibility)">,64 Group<grp_general>,65 Flags<[HelpHidden]>;66 67def help: F<"help">, 68 HelpText<"Display this help message and exit.">,69 Group<grp_general>;70def: Flag<["-"], "h">, Alias<help>,71 Group<grp_general>;72 73def REM : R<["--"], "">, 74 HelpText<"Arguments to pass to launched gdbserver instances.">,75 MetaVarName<"program args">;76