249 lines · plain
1include "llvm/Option/OptParser.td"2 3class F<string name> : Flag<["--", "-"], name>;4class S<string name> : Separate<["--", "-"], name>;5class R<list<string> prefixes, string name>6 : Option<prefixes, name, KIND_REMAINING_ARGS>;7 8// Please keep this in sync with the man page in docs/man/lldb.rst9 10// Attaching options.11def grp_attach : OptionGroup<"attaching">, HelpText<"ATTACHING">;12 13def attach_name14 : Separate<["--", "-"], "attach-name">,15 MetaVarName<"<name>">,16 HelpText<17 "Tells the debugger to attach to a process with the given name.">,18 Group<grp_attach>;19def : Separate<["-"], "n">,20 Alias<attach_name>,21 HelpText<"Alias for --attach-name">,22 Group<grp_attach>;23 24def wait_for25 : F<"wait-for">,26 HelpText<"Tells the debugger to wait for the process with the name "27 "specified by --attach-name to launch before attaching.">,28 Group<grp_attach>;29def : Flag<["-"], "w">,30 Alias<wait_for>,31 HelpText<"Alias for --wait-for">,32 Group<grp_attach>;33 34def attach_pid35 : Separate<["--", "-"], "attach-pid">,36 MetaVarName<"<pid>">,37 HelpText<"Tells the debugger to attach to a process with the given pid.">,38 Group<grp_attach>;39def : Separate<["-"], "p">,40 Alias<attach_pid>,41 HelpText<"Alias for --attach-pid">,42 Group<grp_attach>;43 44// Scripting options.45def grp_scripting : OptionGroup<"scripting">, HelpText<"SCRIPTING">;46 47def python_path48 : F<"python-path">,49 HelpText<50 "Prints out the path to the lldb.py file for this version of lldb.">,51 Group<grp_scripting>;52def : Flag<["-"], "P">,53 Alias<python_path>,54 HelpText<"Alias for --python-path">,55 Group<grp_scripting>;56 57def print_script_interpreter_info58 : F<"print-script-interpreter-info">,59 HelpText<"Prints out a json dictionary with information about the "60 "scripting language interpreter.">,61 Group<grp_scripting>;62 63def script_language : Separate<["--", "-"], "script-language">,64 MetaVarName<"<language>">,65 HelpText<"Tells the debugger to use the specified "66 "scripting language for user-defined scripts.">,67 Group<grp_scripting>;68def : Separate<["-"], "l">,69 Alias<script_language>,70 HelpText<"Alias for --script-language">,71 Group<grp_scripting>;72 73// Repl options.74def grp_repl : OptionGroup<"repl">, HelpText<"REPL">;75 76def repl : Flag<["--", "-"], "repl">,77 HelpText<"Runs lldb in REPL mode with a stub process.">,78 Group<grp_repl>;79def : Flag<["-"], "r">,80 Alias<repl>,81 HelpText<"Alias for --repl">,82 Group<grp_repl>;83def repl_84 : Joined<["--", "-"], "repl=">,85 MetaVarName<"<flags>">,86 HelpText<87 "Runs lldb in REPL mode with a stub process with the given flags.">,88 Group<grp_repl>;89def : Joined<["-"], "r=">,90 MetaVarName<"<flags>">,91 Alias<repl_>,92 HelpText<"Alias for --repl=<flags>">,93 Group<grp_repl>;94 95def repl_language : Separate<["--", "-"], "repl-language">,96 MetaVarName<"<language>">,97 HelpText<"Chooses the language for the REPL.">,98 Group<grp_repl>;99def : Separate<["-"], "R">,100 Alias<repl_language>,101 HelpText<"Alias for --repl-language">,102 Group<grp_repl>;103 104// Command options.105def grp_command : OptionGroup<"command">, HelpText<"COMMANDS">;106 107def no_lldbinit : F<"no-lldbinit">,108 HelpText<"Do not automatically parse any '.lldbinit' files.">,109 Group<grp_command>;110def : Flag<["-"], "x">,111 Alias<no_lldbinit>,112 HelpText<"Alias for --no-lldbinit">,113 Group<grp_command>;114def local_lldbinit115 : F<"local-lldbinit">,116 HelpText<"Allow the debugger to parse the .lldbinit files in the current "117 "working directory, unless --no-lldbinit is passed.">,118 Group<grp_command>;119 120def batch : F<"batch">,121 HelpText<"Tells the debugger to run the commands from -s, -S, -o & "122 "-O, and then quit.">,123 Group<grp_command>;124def : Flag<["-"], "b">,125 Alias<batch>,126 HelpText<"Alias for --batch">,127 Group<grp_command>;128 129def source_quietly130 : F<"source-quietly">,131 HelpText<"Tells the debugger not to echo commands while sourcing files "132 "or one-line commands provided on the command line.">,133 Group<grp_command>;134def : Flag<["-"], "Q">,135 Alias<source_quietly>,136 HelpText<"Alias for --source-quietly">,137 Group<grp_command>;138 139def one_line_on_crash140 : Separate<["--", "-"], "one-line-on-crash">,141 MetaVarName<"<command>">,142 HelpText<"When in batch mode, tells the debugger to run this one-line "143 "lldb command if the target crashes.">,144 Group<grp_command>;145def : Separate<["-"], "k">,146 Alias<one_line_on_crash>,147 HelpText<"Alias for --one-line-on-crash">,148 Group<grp_command>;149 150def source_on_crash151 : Separate<["--", "-"], "source-on-crash">,152 MetaVarName<"<file>">,153 HelpText<"When in batch mode, tells the debugger to source this file of "154 "lldb commands if the target crashes.">,155 Group<grp_command>;156def : Separate<["-"], "K">,157 Alias<source_on_crash>,158 HelpText<"Alias for --source-on-crash">,159 Group<grp_command>;160 161def source162 : Separate<["--", "-"], "source">,163 MetaVarName<"<file>">,164 HelpText<"Tells the debugger to read in and execute the lldb commands in "165 "the given file, after any file has been loaded.">,166 Group<grp_command>;167def : Separate<["-"], "s">,168 Alias<source>,169 HelpText<"Alias for --source">,170 Group<grp_command>;171 172def source_before_file173 : Separate<["--", "-"], "source-before-file">,174 MetaVarName<"<file>">,175 HelpText<"Tells the debugger to read in and execute the lldb commands in "176 "the given file, before any file has been loaded.">,177 Group<grp_command>;178def : Separate<["-"], "S">,179 Alias<source_before_file>,180 HelpText<"Alias for --source-before-file">,181 Group<grp_command>;182 183def one_line184 : Separate<["--", "-"], "one-line">,185 MetaVarName<"<command>">,186 HelpText<"Tells the debugger to execute this one-line lldb command after "187 "any file provided on the command line has been loaded.">,188 Group<grp_command>;189def : Separate<["-"], "o">,190 Alias<one_line>,191 HelpText<"Alias for --one-line">,192 Group<grp_command>;193 194def one_line_before_file195 : Separate<["--", "-"], "one-line-before-file">,196 MetaVarName<"<command>">,197 HelpText<"Tells the debugger to execute this one-line lldb command "198 "before any file provided on the command line has been loaded.">,199 Group<grp_command>;200def : Separate<["-"], "O">,201 Alias<one_line_before_file>,202 HelpText<"Alias for --one-line-before-file">,203 Group<grp_command>;204 205// General options.206def version207 : F<"version">,208 HelpText<"Prints out the current version number of the LLDB debugger.">;209def : Flag<["-"], "v">, Alias<version>, HelpText<"Alias for --version">;210 211def help : F<"help">,212 HelpText<"Prints out the usage information for the LLDB debugger.">;213def : Flag<["-"], "h">, Alias<help>, HelpText<"Alias for --help">;214 215def core : Separate<["--", "-"], "core">,216 MetaVarName<"<filename>">,217 HelpText<"Tells the debugger to use the full path to <filename> as "218 "the core file.">;219def : Separate<["-"], "c">, Alias<core>, HelpText<"Alias for --core">;220 221def editor : F<"editor">,222 HelpText<"Tells the debugger to open source files using the "223 "host's \"external editor\" mechanism.">;224def : Flag<["-"], "e">, Alias<editor>, HelpText<"Alias for --editor">;225 226def no_use_colors : F<"no-use-colors">, HelpText<"Do not use colors.">;227def : Flag<["-"], "X">,228 Alias<no_use_colors>,229 HelpText<"Alias for --no-use-colors">;230 231def file : Separate<["--", "-"], "file">,232 MetaVarName<"<filename>">,233 HelpText<"Tells the debugger to use the file <filename> as the "234 "program to be debugged.">;235def : Separate<["-"], "f">, Alias<file>, HelpText<"Alias for --file">;236 237def arch : Separate<["--", "-"], "arch">,238 MetaVarName<"<architecture>">,239 HelpText<"Tells the debugger to use the specified architecture when "240 "starting and running the program.">;241def : Separate<["-"], "a">, Alias<arch>, HelpText<"Alias for --arch">;242 243def debug : F<"debug">,244 HelpText<"Tells the debugger to print out extra information for "245 "debugging itself.">;246def : Flag<["-"], "d">, Alias<debug>, HelpText<"Alias for --debug">;247 248def REM : R<["--"], "">;249