Lines Matching full:command
41 interpreter, "command source",
105 // Instance variables to hold the values for command options.
113 void DoExecute(Args &command, CommandReturnObject &result) override {
114 if (command.GetArgumentCount() != 1) {
125 result.AppendError("command source -C can only be specified "
126 "from a command file");
132 FileSpec cmd_file(command[0].ref());
136 result.AppendError("command source -C can only be used "
158 // Individual silent setting is override for global command echo settings.
182 "Enter your Python command(s). Type 'DONE' to end.\n"
240 interpreter, "command alias",
241 "Define a custom command in terms of an existing command.") {
248 Below are some simple examples of how one might use the 'alias' command:"
251 (lldb) command alias sc script
253 Creates the abbreviation 'sc' for the 'script' command.
255 (lldb) command alias bp breakpoint
258 " Creates the abbreviation 'bp' for the 'breakpoint' command. Since \
263 (lldb) command alias bpl breakpoint list
265 Creates the abbreviation 'bpl' for the two-word command 'breakpoint list'.
268 "An alias can include some options for the command, with the values either \
274 (lldb) command alias bfl breakpoint set -f %1 -l %2
281 for the actual arguments that will be passed when the alias command is used. \
292 command, so you can't at present do something like this to append the file extension \
296 (lldb) command alias bcppfl breakpoint set -f %1.cpp -l %2
299 "For more complex aliasing, use the \"command regex\" command instead. In the \
305 (lldb) command alias bfl breakpoint set -f %1 -l %2
312 (lldb) command alias pltty process launch -s -o %1 -e %1
323 (lldb) command alias bl3 breakpoint set -f %1 -l 3
370 result.AppendError("'command alias' requires at least two arguments");
388 result.AppendError("'command alias' requires at least two arguments");
392 // Get the alias command.
398 result.AppendWarning("if trying to pass options to 'command alias' add "
413 result.AppendError("Error parsing command string. No alias created.");
417 // Verify that the command is alias-able.
420 "'%s' is a permanent debugger command and cannot be redefined.\n",
427 "'%s' is a user container command and cannot be overwritten.\n"
428 "Delete it first with 'command container delete'\n",
433 // Get CommandObject that is being aliased. The command name is read from
435 // name of the command object stripped off the front.
441 result.AppendErrorWithFormat("invalid command given to 'command alias'. "
442 "'%s' does not begin with a valid command."
446 // Note that args was initialized with the original command, and has not
460 // Verify & handle any options/arguments passed to the alias command
466 // Look up the command using command's name first. This is to resolve
498 result.AppendError("'command alias' requires at least two arguments");
506 args.Shift(); // Shift the alias command word off the argument vector.
507 args.Shift(); // Shift the old command word off the argument vector.
509 // Verify that the command is alias'able, and get the appropriate command
514 "'%s' is a permanent debugger command and cannot be redefined.\n",
521 "'%s' is user container command and cannot be overwritten.\n"
522 "Delete it first with 'command container delete'",
532 result.AppendErrorWithFormat("'%s' is not an existing command.\n",
547 "'%s' is not a valid sub-command of '%s'. "
559 // Verify & handle any options/arguments passed to the alias command
602 interpreter, "command unalias",
603 "Delete one or more custom commands defined by 'command alias'.",
635 "'%s' is not a known command.\nTry 'help' to see a "
644 "'%s' is not an alias, it is a debugger command which can be "
645 "removed using the 'command delete' command.\n",
649 "'%s' is a permanent debugger command and cannot be removed.\n",
677 interpreter, "command delete",
678 "Delete one or more custom commands defined by 'command regex'.",
703 "defined regular expression command names",
722 "'%s' is a permanent debugger command and cannot be removed.\n",
743 interpreter, "command regex",
744 "Define a custom command in terms of "
747 "command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
753 "This command allows the user to create powerful regular expression commands \
767 "The regular expressions can all be specified on the command line if more than \
768 one argument is provided. If just the command name is provided on the command \
770 lines, followed by an empty line to terminate the command definition."
776 "The following example will define a regular expression command named 'f' that \
781 (lldb) command regex f s/^$/finish/ 's/([0-9]+)/frame select %1/')");
822 void DoExecute(Args &command, CommandReturnObject &result) override {
823 const size_t argc = command.GetArgumentCount();
825 result.AppendError("usage: 'command regex <command-name> "
831 auto name = command[0].ref();
854 for (auto &entry : command.entries().drop_front()) {
876 "invalid regular expression command object for: '%.*s'",
1016 // Instance variables to hold the values for command options.
1093 // Don't change the status if the command already set it...
1110 /// This class implements a "raw" scripted command. lldb does no parsing of the
1111 /// command line, instead passing the line unaltered (except for backtick
1199 // Don't change the status if the command already set it...
1218 /// This command implements a lldb parsed scripted command. The command
1220 /// setting callback, and then the command's execution function gets passed
1222 /// Note, implementing a command in Python using these base interfaces is a bit
1643 // a vector in the command instance. It gets resized to the correct size
1882 // CommandObjectParsed requires that a command with no options return
1903 // Don't change the status if the command already set it...
1933 : CommandObjectParsed(interpreter, "command script import",
1982 void DoExecute(Args &command, CommandReturnObject &result) override {
1983 if (command.empty()) {
1984 result.AppendError("command script import needs one or more arguments");
1992 result.AppendError("command script import -c can only be specified "
1993 "from a command file");
1998 for (auto &entry : command.entries()) {
2007 // actually possible to craft a Python script that does other "command
2010 // from the CommandObject itself, so that recursive command invocations
2035 : CommandObjectParsed(interpreter, "command script add",
2036 "Add a scripted function as an LLDB command.",
2037 "Add a scripted function as an lldb command. "
2038 "If you provide a single argument, the command "
2039 "will be added at the root level of the command "
2042 "command, and the last element will be the new "
2043 "command name."),
2107 "unrecognized value for command completion type '%s'",
2132 // Instance variables to hold the values for command options.
2165 "add python command.\n");
2177 error_sp->Printf("error: unable to add selected command: '%s'",
2185 error_sp->Printf("error: unable to add selected command: '%s'",
2193 "error: unable to create function, didn't add python command\n");
2197 error_sp->Printf("error: empty function, didn't add python command\n");
2202 "error: script interpreter missing, didn't add python command\n");
2209 void DoExecute(Args &command, CommandReturnObject &result) override {
2216 if (command.GetArgumentCount() == 0) {
2217 result.AppendError("'command script add' requires at least one argument");
2235 command, true, path_error);
2238 result.AppendErrorWithFormat("error in command path: %s",
2245 m_cmd_name = std::string(command[0].ref());
2247 size_t num_args = command.GetArgumentCount();
2248 m_cmd_name = std::string(command[num_args - 1].ref());
2299 result.AppendErrorWithFormat("cannot add command: %s",
2306 "cannot add command: %s",
2326 : CommandObjectParsed(interpreter, "command script list",
2332 void DoExecute(Args &command, CommandReturnObject &result) override {
2344 : CommandObjectParsed(interpreter, "command script clear",
2350 void DoExecute(Args &command, CommandReturnObject &result) override {
2363 interpreter, "command script delete",
2364 "Delete a scripted command by specifying the path to the command.",
2379 void DoExecute(Args &command, CommandReturnObject &result) override {
2381 llvm::StringRef root_cmd = command[0].ref();
2382 size_t num_args = command.GetArgumentCount();
2385 result.AppendErrorWithFormat("empty root command name");
2397 result.AppendErrorWithFormat("command '%s' not found.",
2398 command[0].c_str());
2402 result.AppendErrorWithFormat("command '%s' is not a user command.",
2403 command[0].c_str());
2407 result.AppendErrorWithFormat("command '%s' is a multi-word command.\n "
2408 "Delete with \"command container delete\"",
2409 command[0].c_str());
2413 if (command.GetArgumentCount() == 1) {
2418 // We're deleting a command from a multiword command. Verify the command
2422 GetCommandInterpreter().VerifyUserMultiwordCmdPath(command, true,
2425 result.AppendErrorWithFormat("could not resolve command path: %s",
2430 // This means that command only had a leaf command, so the container is
2433 command[0].c_str());
2436 const char *leaf_cmd = command[num_args - 1].c_str();
2442 "could not delete command '%s': %s", leaf_cmd,
2449 out_stream << "Deleted command:";
2452 out_stream << command[idx].c_str();
2467 interpreter, "command script",
2471 "command script <subcommand> [<subcommand-options>]") {
2498 interpreter, "command container add",
2499 "Add a container command to lldb. Adding to built-"
2501 "command container add [[path1]...] container-name") {
2557 // Instance variables to hold the values for command options.
2563 void DoExecute(Args &command, CommandReturnObject &result) override {
2564 size_t num_args = command.GetArgumentCount();
2567 result.AppendError("no command was specified");
2572 // We're adding this as a root command, so use the interpreter.
2573 const char *cmd_name = command.GetArgumentAtIndex(0);
2581 result.AppendErrorWithFormat("error adding command: %s",
2592 GetCommandInterpreter().VerifyUserMultiwordCmdPath(command, true,
2596 result.AppendErrorWithFormat("error adding command: %s",
2601 const char *cmd_name = command.GetArgumentAtIndex(num_args - 1);
2626 interpreter, "command container delete",
2627 "Delete a container command previously added to "
2629 "command container delete [[path1] ...] container-cmd") {
2643 void DoExecute(Args &command, CommandReturnObject &result) override {
2644 size_t num_args = command.GetArgumentCount();
2647 result.AppendError("No command was specified.");
2652 // We're removing a root command, so we need to delete it from the
2654 const char *cmd_name = command.GetArgumentAtIndex(0);
2659 result.AppendErrorWithFormat("container command %s doesn't exist.",
2665 "container command %s is not a user command", cmd_name);
2669 result.AppendErrorWithFormat("command %s is not a container command",
2676 result.AppendErrorWithFormat("error removing command %s.", cmd_name);
2687 GetCommandInterpreter().VerifyUserMultiwordCmdPath(command, true,
2691 result.AppendErrorWithFormat("error removing container command: %s",
2695 const char *leaf = command.GetArgumentAtIndex(num_args - 1);
2699 result.AppendErrorWithFormat("error removing container command: %s",
2711 interpreter, "command container",
2714 "add nested container commands by specifying a command path, "
2715 "but you can't add commands into the built-in command hierarchy.",
2716 "command container <subcommand> [<subcommand-options>]") {
2733 : CommandObjectMultiword(interpreter, "command",
2735 "command <subcommand> [<subcommand-options>]") {