10b57cec5SDimitry Andricinclude "llvm/Option/OptParser.td" 20b57cec5SDimitry Andric 30b57cec5SDimitry Andricclass F<string name>: Flag<["--", "-"], name>; 40b57cec5SDimitry Andricclass S<string name>: Separate<["--", "-"], name>; 50b57cec5SDimitry Andricclass R<list<string> prefixes, string name> 60b57cec5SDimitry Andric : Option<prefixes, name, KIND_REMAINING_ARGS>; 70b57cec5SDimitry Andric 8480093f4SDimitry Andric// Please keep this in sync with the man page in docs/man/lldb.rst 9480093f4SDimitry Andric 100b57cec5SDimitry Andric// Attaching options. 110b57cec5SDimitry Andricdef grp_attach : OptionGroup<"attaching">, HelpText<"ATTACHING">; 120b57cec5SDimitry Andric 130b57cec5SDimitry Andricdef attach_name: Separate<["--", "-"], "attach-name">, 140b57cec5SDimitry Andric MetaVarName<"<name>">, 150b57cec5SDimitry Andric HelpText<"Tells the debugger to attach to a process with the given name.">, 160b57cec5SDimitry Andric Group<grp_attach>; 170b57cec5SDimitry Andricdef: Separate<["-"], "n">, 180b57cec5SDimitry Andric Alias<attach_name>, 190b57cec5SDimitry Andric HelpText<"Alias for --attach-name">, 200b57cec5SDimitry Andric Group<grp_attach>; 210b57cec5SDimitry Andric 220b57cec5SDimitry Andricdef wait_for: F<"wait-for">, 230b57cec5SDimitry Andric HelpText<"Tells the debugger to wait for a process with the given pid or name to launch before attaching.">, 240b57cec5SDimitry Andric Group<grp_attach>; 250b57cec5SDimitry Andricdef: Flag<["-"], "w">, 260b57cec5SDimitry Andric Alias<wait_for>, 270b57cec5SDimitry Andric HelpText<"Alias for --wait-for">, 280b57cec5SDimitry Andric Group<grp_attach>; 290b57cec5SDimitry Andric 300b57cec5SDimitry Andricdef attach_pid: Separate<["--", "-"], "attach-pid">, 310b57cec5SDimitry Andric MetaVarName<"<pid>">, 320b57cec5SDimitry Andric HelpText<"Tells the debugger to attach to a process with the given pid.">, 330b57cec5SDimitry Andric Group<grp_attach>; 340b57cec5SDimitry Andricdef: Separate<["-"], "p">, 350b57cec5SDimitry Andric Alias<attach_pid>, 360b57cec5SDimitry Andric HelpText<"Alias for --attach-pid">, 370b57cec5SDimitry Andric Group<grp_attach>; 380b57cec5SDimitry Andric 390b57cec5SDimitry Andric 400b57cec5SDimitry Andric// Scripting options. 410b57cec5SDimitry Andricdef grp_scripting : OptionGroup<"scripting">, HelpText<"SCRIPTING">; 420b57cec5SDimitry Andric 430b57cec5SDimitry Andricdef python_path: F<"python-path">, 440b57cec5SDimitry Andric HelpText<"Prints out the path to the lldb.py file for this version of lldb.">, 450b57cec5SDimitry Andric Group<grp_scripting>; 460b57cec5SDimitry Andricdef: Flag<["-"], "P">, 470b57cec5SDimitry Andric Alias<python_path>, 480b57cec5SDimitry Andric HelpText<"Alias for --python-path">, 490b57cec5SDimitry Andric Group<grp_scripting>; 500b57cec5SDimitry Andric 51*349cc55cSDimitry Andricdef print_script_interpreter_info: F<"print-script-interpreter-info">, 52*349cc55cSDimitry Andric HelpText<"Prints out a json dictionary with information about the scripting language interpreter.">, 53*349cc55cSDimitry Andric Group<grp_scripting>; 54*349cc55cSDimitry Andric 550b57cec5SDimitry Andricdef script_language: Separate<["--", "-"], "script-language">, 560b57cec5SDimitry Andric MetaVarName<"<language>">, 570b57cec5SDimitry Andric HelpText<"Tells the debugger to use the specified scripting language for user-defined scripts.">, 580b57cec5SDimitry Andric Group<grp_scripting>; 590b57cec5SDimitry Andricdef: Separate<["-"], "l">, 600b57cec5SDimitry Andric Alias<script_language>, 610b57cec5SDimitry Andric HelpText<"Alias for --script-language">, 620b57cec5SDimitry Andric Group<grp_scripting>; 630b57cec5SDimitry Andric 640b57cec5SDimitry Andric// Repl options. 650b57cec5SDimitry Andricdef grp_repl : OptionGroup<"repl">, HelpText<"REPL">; 660b57cec5SDimitry Andric 670b57cec5SDimitry Andricdef repl: Flag<["--", "-"], "repl">, 680b57cec5SDimitry Andric HelpText<"Runs lldb in REPL mode with a stub process.">, 690b57cec5SDimitry Andric Group<grp_repl>; 700b57cec5SDimitry Andricdef: Flag<["-"], "r">, 710b57cec5SDimitry Andric Alias<repl>, 720b57cec5SDimitry Andric HelpText<"Alias for --repl">, 730b57cec5SDimitry Andric Group<grp_repl>; 740b57cec5SDimitry Andricdef repl_: Joined<["--", "-"], "repl=">, 750b57cec5SDimitry Andric MetaVarName<"<flags>">, 760b57cec5SDimitry Andric HelpText<"Runs lldb in REPL mode with a stub process with the given flags.">, 770b57cec5SDimitry Andric Group<grp_repl>; 780b57cec5SDimitry Andricdef: Joined<["-"], "r=">, 790b57cec5SDimitry Andric MetaVarName<"<flags>">, 800b57cec5SDimitry Andric Alias<repl_>, 810b57cec5SDimitry Andric HelpText<"Alias for --repl=<flags>">, 820b57cec5SDimitry Andric Group<grp_repl>; 830b57cec5SDimitry Andric 840b57cec5SDimitry Andricdef repl_language: Separate<["--", "-"], "repl-language">, 850b57cec5SDimitry Andric MetaVarName<"<language>">, 860b57cec5SDimitry Andric HelpText<"Chooses the language for the REPL.">, 870b57cec5SDimitry Andric Group<grp_repl>; 880b57cec5SDimitry Andricdef: Separate<["-"], "R">, 890b57cec5SDimitry Andric Alias<repl_language>, 900b57cec5SDimitry Andric HelpText<"Alias for --repl-language">, 910b57cec5SDimitry Andric Group<grp_repl>; 920b57cec5SDimitry Andric 930b57cec5SDimitry Andric 940b57cec5SDimitry Andric// Command options. 950b57cec5SDimitry Andricdef grp_command : OptionGroup<"command">, HelpText<"COMMANDS">; 960b57cec5SDimitry Andric 970b57cec5SDimitry Andricdef no_lldbinit: F<"no-lldbinit">, 980b57cec5SDimitry Andric HelpText<"Do not automatically parse any '.lldbinit' files.">, 990b57cec5SDimitry Andric Group<grp_command>; 1000b57cec5SDimitry Andricdef: Flag<["-"], "x">, 1010b57cec5SDimitry Andric Alias<no_lldbinit>, 1020b57cec5SDimitry Andric HelpText<"Alias for --no-lldbinit">, 1030b57cec5SDimitry Andric Group<grp_command>; 1040b57cec5SDimitry Andricdef local_lldbinit: F<"local-lldbinit">, 1050b57cec5SDimitry Andric HelpText<"Allow the debugger to parse the .lldbinit files in the current working directory, unless --no-lldbinit is passed.">, 1060b57cec5SDimitry Andric Group<grp_command>; 1070b57cec5SDimitry Andric 1080b57cec5SDimitry Andricdef batch: F<"batch">, 1090b57cec5SDimitry Andric HelpText<"Tells the debugger to run the commands from -s, -S, -o & -O, and then quit.">, 1100b57cec5SDimitry Andric Group<grp_command>; 1110b57cec5SDimitry Andricdef: Flag<["-"], "b">, 1120b57cec5SDimitry Andric Alias<batch>, 1130b57cec5SDimitry Andric HelpText<"Alias for --batch">, 1140b57cec5SDimitry Andric Group<grp_command>; 1150b57cec5SDimitry Andric 1160b57cec5SDimitry Andricdef source_quietly: F<"source-quietly">, 117*349cc55cSDimitry Andric HelpText<"Tells the debugger not to echo commands while sourcing files or one-line commands provided on the command line.">, 1180b57cec5SDimitry Andric Group<grp_command>; 1190b57cec5SDimitry Andricdef: Flag<["-"], "Q">, 1200b57cec5SDimitry Andric Alias<source_quietly>, 1210b57cec5SDimitry Andric HelpText<"Alias for --source-quietly">, 1220b57cec5SDimitry Andric Group<grp_command>; 1230b57cec5SDimitry Andric 1240b57cec5SDimitry Andricdef one_line_on_crash: Separate<["--", "-"], "one-line-on-crash">, 1250b57cec5SDimitry Andric MetaVarName<"<command>">, 126480093f4SDimitry Andric HelpText<"When in batch mode, tells the debugger to run this one-line lldb command if the target crashes.">, 1270b57cec5SDimitry Andric Group<grp_command>; 1280b57cec5SDimitry Andricdef: Separate<["-"], "k">, 1290b57cec5SDimitry Andric Alias<one_line_on_crash>, 1300b57cec5SDimitry Andric HelpText<"Alias for --one-line-on-crash">, 1310b57cec5SDimitry Andric Group<grp_command>; 1320b57cec5SDimitry Andric 1330b57cec5SDimitry Andricdef source_on_crash: Separate<["--", "-"], "source-on-crash">, 1340b57cec5SDimitry Andric MetaVarName<"<file>">, 1350b57cec5SDimitry Andric HelpText<"When in batch mode, tells the debugger to source this file of lldb commands if the target crashes.">, 1360b57cec5SDimitry Andric Group<grp_command>; 1370b57cec5SDimitry Andricdef: Separate<["-"], "K">, 1380b57cec5SDimitry Andric Alias<source_on_crash>, 1390b57cec5SDimitry Andric HelpText<"Alias for --source-on-crash">, 1400b57cec5SDimitry Andric Group<grp_command>; 1410b57cec5SDimitry Andric 1420b57cec5SDimitry Andricdef source: Separate<["--", "-"], "source">, 1430b57cec5SDimitry Andric MetaVarName<"<file>">, 1440b57cec5SDimitry Andric HelpText<"Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded.">, 1450b57cec5SDimitry Andric Group<grp_command>; 1460b57cec5SDimitry Andricdef: Separate<["-"], "s">, 1470b57cec5SDimitry Andric Alias<source>, 1480b57cec5SDimitry Andric HelpText<"Alias for --source">, 1490b57cec5SDimitry Andric Group<grp_command>; 1500b57cec5SDimitry Andric 1510b57cec5SDimitry Andricdef source_before_file: Separate<["--", "-"], "source-before-file">, 1520b57cec5SDimitry Andric MetaVarName<"<file>">, 1530b57cec5SDimitry Andric HelpText<"Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded.">, 1540b57cec5SDimitry Andric Group<grp_command>; 1550b57cec5SDimitry Andricdef: Separate<["-"], "S">, 1560b57cec5SDimitry Andric Alias<source_before_file>, 1570b57cec5SDimitry Andric HelpText<"Alias for --source-before-file">, 1580b57cec5SDimitry Andric Group<grp_command>; 1590b57cec5SDimitry Andric 1600b57cec5SDimitry Andricdef one_line: Separate<["--", "-"], "one-line">, 1610b57cec5SDimitry Andric MetaVarName<"<command>">, 1620b57cec5SDimitry Andric HelpText<"Tells the debugger to execute this one-line lldb command after any file provided on the command line has been loaded.">, 1630b57cec5SDimitry Andric Group<grp_command>; 1640b57cec5SDimitry Andricdef: Separate<["-"], "o">, 1650b57cec5SDimitry Andric Alias<one_line>, 1660b57cec5SDimitry Andric HelpText<"Alias for --one-line">, 1670b57cec5SDimitry Andric Group<grp_command>; 1680b57cec5SDimitry Andric 1690b57cec5SDimitry Andricdef one_line_before_file: Separate<["--", "-"], "one-line-before-file">, 1700b57cec5SDimitry Andric MetaVarName<"<command>">, 1710b57cec5SDimitry Andric HelpText<"Tells the debugger to execute this one-line lldb command before any file provided on the command line has been loaded.">, 1720b57cec5SDimitry Andric Group<grp_command>; 1730b57cec5SDimitry Andricdef: Separate<["-"], "O">, 1740b57cec5SDimitry Andric Alias<one_line_before_file>, 1750b57cec5SDimitry Andric HelpText<"Alias for --one-line-before-file">, 1760b57cec5SDimitry Andric Group<grp_command>; 1770b57cec5SDimitry Andric 1780b57cec5SDimitry Andric 1790b57cec5SDimitry Andric// General options. 1800b57cec5SDimitry Andricdef version: F<"version">, 1810b57cec5SDimitry Andric HelpText<"Prints out the current version number of the LLDB debugger.">; 1820b57cec5SDimitry Andricdef: Flag<["-"], "v">, 1830b57cec5SDimitry Andric Alias<version>, 1840b57cec5SDimitry Andric HelpText<"Alias for --version">; 1850b57cec5SDimitry Andric 1860b57cec5SDimitry Andricdef help: F<"help">, 1870b57cec5SDimitry Andric HelpText<"Prints out the usage information for the LLDB debugger.">; 1880b57cec5SDimitry Andricdef: Flag<["-"], "h">, 1890b57cec5SDimitry Andric Alias<help>, 1900b57cec5SDimitry Andric HelpText<"Alias for --help">; 1910b57cec5SDimitry Andric 1920b57cec5SDimitry Andricdef core: Separate<["--", "-"], "core">, 1930b57cec5SDimitry Andric MetaVarName<"<filename>">, 1940b57cec5SDimitry Andric HelpText<"Tells the debugger to use the full path to <filename> as the core file.">; 1950b57cec5SDimitry Andricdef: Separate<["-"], "c">, 1960b57cec5SDimitry Andric Alias<core>, 1970b57cec5SDimitry Andric HelpText<"Alias for --core">; 1980b57cec5SDimitry Andric 1990b57cec5SDimitry Andricdef editor: F<"editor">, 2000b57cec5SDimitry Andric HelpText<"Tells the debugger to open source files using the host's \"external editor\" mechanism.">; 2010b57cec5SDimitry Andricdef: Flag<["-"], "e">, 2020b57cec5SDimitry Andric Alias<editor>, 2030b57cec5SDimitry Andric HelpText<"Alias for --editor">; 2040b57cec5SDimitry Andric 2050b57cec5SDimitry Andricdef no_use_colors: F<"no-use-colors">, 2060b57cec5SDimitry Andric HelpText<"Do not use colors.">; 2070b57cec5SDimitry Andricdef: Flag<["-"], "X">, 2080b57cec5SDimitry Andric Alias<no_use_colors>, 2090b57cec5SDimitry Andric HelpText<"Alias for --no-use-color">; 2100b57cec5SDimitry Andric 2110b57cec5SDimitry Andricdef file: Separate<["--", "-"], "file">, 2120b57cec5SDimitry Andric MetaVarName<"<filename>">, 2130b57cec5SDimitry Andric HelpText<"Tells the debugger to use the file <filename> as the program to be debugged.">; 2140b57cec5SDimitry Andricdef: Separate<["-"], "f">, 2150b57cec5SDimitry Andric Alias<file>, 2160b57cec5SDimitry Andric HelpText<"Alias for --file">; 2170b57cec5SDimitry Andric 2180b57cec5SDimitry Andricdef arch: Separate<["--", "-"], "arch">, 2190b57cec5SDimitry Andric MetaVarName<"<architecture>">, 2200b57cec5SDimitry Andric HelpText<"Tells the debugger to use the specified architecture when starting and running the program.">; 2210b57cec5SDimitry Andricdef: Separate<["-"], "a">, 2220b57cec5SDimitry Andric Alias<arch>, 2230b57cec5SDimitry Andric HelpText<"Alias for --arch">; 2240b57cec5SDimitry Andric 2250b57cec5SDimitry Andricdef debug: F<"debug">, 2260b57cec5SDimitry Andric HelpText<"Tells the debugger to print out extra information for debugging itself.">; 2270b57cec5SDimitry Andricdef: Flag<["-"], "d">, 2280b57cec5SDimitry Andric Alias<debug>, 2290b57cec5SDimitry Andric HelpText<"Alias for --debug">; 2300b57cec5SDimitry Andric 2310b57cec5SDimitry Andricdef REM : R<["--"], "">; 232