LLDB mainline
|
#include <CommandObjectMultiword.h>
Public Member Functions | |
CommandObjectProxy (CommandInterpreter &interpreter, const char *name, const char *help=nullptr, const char *syntax=nullptr, uint32_t flags=0) | |
~CommandObjectProxy () override | |
virtual CommandObject * | GetProxyCommandObject ()=0 |
llvm::StringRef | GetSyntax () override |
llvm::StringRef | GetHelp () override |
llvm::StringRef | GetHelpLong () override |
bool | IsRemovable () const override |
bool | IsMultiwordObject () override |
CommandObjectMultiword * | GetAsMultiwordCommand () override |
void | GenerateHelpText (Stream &result) override |
lldb::CommandObjectSP | GetSubcommandSP (llvm::StringRef sub_cmd, StringList *matches=nullptr) override |
CommandObject * | GetSubcommandObject (llvm::StringRef sub_cmd, StringList *matches=nullptr) override |
bool | LoadSubCommand (llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override |
bool | WantsRawCommandString () override |
bool | WantsCompletion () override |
Options * | GetOptions () override |
void | HandleCompletion (CompletionRequest &request) override |
This default version handles calling option argument completions and then calls HandleArgumentCompletion if the cursor is on an argument, not an option. | |
void | HandleArgumentCompletion (CompletionRequest &request, OptionElementVector &opt_element_vector) override |
The default version handles argument definitions that have only one argument type, and use one of the argument types that have an entry in the CommonCompletions. | |
std::optional< std::string > | GetRepeatCommand (Args ¤t_command_args, uint32_t index) override |
Get the command that appropriate for a "repeat" of the current command. | |
virtual llvm::StringRef | GetUnsupportedError () |
void | Execute (const char *args_string, CommandReturnObject &result) override |
Public Member Functions inherited from lldb_private::CommandObject | |
CommandObject (CommandInterpreter &interpreter, llvm::StringRef name, llvm::StringRef help="", llvm::StringRef syntax="", uint32_t flags=0) | |
virtual | ~CommandObject ()=default |
CommandInterpreter & | GetCommandInterpreter () |
Debugger & | GetDebugger () |
llvm::StringRef | GetCommandName () const |
virtual void | SetHelp (llvm::StringRef str) |
virtual void | SetHelpLong (llvm::StringRef str) |
void | SetSyntax (llvm::StringRef str) |
bool | IsUserCommand () |
void | SetIsUserCommand (bool is_user) |
virtual bool | IsAlias () |
virtual bool | IsDashDashCommand () |
virtual lldb::CommandObjectSP | GetSubcommandSPExact (llvm::StringRef sub_cmd) |
void | FormatLongHelpText (Stream &output_strm, llvm::StringRef long_help) |
void | GenerateHelpText (CommandReturnObject &result) |
virtual llvm::Error | LoadUserSubcommand (llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj, bool can_replace) |
void | AddSimpleArgumentList (lldb::CommandArgumentType arg_type, ArgumentRepetitionType repetition_type=eArgRepeatPlain) |
void | AddIDsArgumentData (IDType type) |
int | GetNumArgumentEntries () |
CommandArgumentEntry * | GetArgumentEntryAtIndex (int idx) |
void | GetFormattedCommandArguments (Stream &str, uint32_t opt_set_mask=LLDB_OPT_SET_ALL) |
bool | ParseOptions (Args &args, CommandReturnObject &result) |
void | SetCommandName (llvm::StringRef name) |
bool | HelpTextContainsWord (llvm::StringRef search_word, bool search_short_help=true, bool search_long_help=true, bool search_syntax=true, bool search_options=true) |
Flags & | GetFlags () |
The flags accessor. | |
const Flags & | GetFlags () const |
The flags const accessor. | |
bool | HasOverrideCallback () const |
void | SetOverrideCallback (lldb::CommandOverrideCallback callback, void *baton) |
void | SetOverrideCallback (lldb_private::CommandOverrideCallbackWithResult callback, void *baton) |
bool | InvokeOverrideCallback (const char **argv, CommandReturnObject &result) |
void | SetOriginalCommandString (std::string s) |
Set the command input as it appeared in the terminal. |
Friends | |
class | CommandInterpreter |
class | CommandObjectSyntax |
Definition at line 79 of file CommandObjectMultiword.h.
CommandObjectProxy::CommandObjectProxy | ( | CommandInterpreter & | interpreter, |
const char * | name, | ||
const char * | help = nullptr, | ||
const char * | syntax = nullptr, | ||
uint32_t | flags = 0 ) |
Definition at line 316 of file CommandObjectMultiword.cpp.
References CommandInterpreter, and lldb_private::CommandObject::CommandObject().
Referenced by CommandObjectProcessPlugin::CommandObjectProcessPlugin(), lldb_private::CommandObjectTraceProxy::CommandObjectTraceProxy(), and IsRemovable().
|
overridedefault |
|
overridevirtual |
offset_in_command | is on what column args_string appears, if applicable. This enables diagnostics that refer back to the user input. |
Implements lldb_private::CommandObject.
Definition at line 446 of file CommandObjectMultiword.cpp.
References lldb_private::CommandReturnObject::AppendError(), lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and GetUnsupportedError().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 373 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), lldb_private::CommandObject::GenerateHelpText(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 366 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), lldb_private::CommandObject::GetAsMultiwordCommand(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 330 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), lldb_private::CommandObject::GetHelp(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 344 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), lldb_private::CommandObject::GetHelpLong(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 323 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), lldb_private::CommandObject::GetOptions(), and GetProxyCommandObject().
|
pure virtual |
Implemented in CommandObjectProcessPlugin, and lldb_private::CommandObjectTraceProxy.
References lldb_private::CommandObject::CommandObject().
Referenced by Execute(), GenerateHelpText(), GetAsMultiwordCommand(), GetHelp(), GetHelpLong(), GetOptions(), GetRepeatCommand(), GetSubcommandObject(), GetSubcommandSP(), GetSyntax(), HandleArgumentCompletion(), HandleCompletion(), IsMultiwordObject(), IsRemovable(), LoadSubCommand(), WantsCompletion(), and WantsRawCommandString().
|
overridevirtual |
Get the command that appropriate for a "repeat" of the current command.
[in] | current_command_args | The command arguments. |
[in] | index | This is for internal use - it is how the completion request is tracked in CommandObjectMultiword, and should otherwise be ignored. |
Reimplemented from lldb_private::CommandObject.
Definition at line 434 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::GetRepeatCommand().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 390 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::GetSubcommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 382 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::GetSubcommandSP().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 337 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::GetSyntax().
|
virtual |
Reimplemented in lldb_private::CommandObjectTraceProxy.
Definition at line 442 of file CommandObjectMultiword.cpp.
Referenced by Execute().
|
overridevirtual |
The default version handles argument definitions that have only one argument type, and use one of the argument types that have an entry in the CommonCompletions.
Override this if you have a more complex argument setup. FIXME: we should be able to extend this to more complex argument definitions provided we have completers for all the argument types.
The input array contains a parsed version of the line.
We've constructed the map of options and their arguments as well if that is helpful for the completion.
[in,out] | request | The completion request that needs to be answered. |
Reimplemented from lldb_private::CommandObject.
Definition at line 426 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::HandleArgumentCompletion().
|
overridevirtual |
This default version handles calling option argument completions and then calls HandleArgumentCompletion if the cursor is on an argument, not an option.
Don't override this method, override HandleArgumentCompletion instead unless you have special reasons.
[in,out] | request | The completion request that needs to be answered. |
Reimplemented from lldb_private::CommandObject.
Definition at line 420 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::HandleCompletion().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 359 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::IsMultiwordObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 351 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), CommandObjectProxy(), GetProxyCommandObject(), and lldb_private::CommandObject::IsRemovable().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 398 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::LoadSubCommand().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 413 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::WantsCompletion().
|
overridevirtual |
Implements lldb_private::CommandObject.
Definition at line 406 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::CommandObject(), GetProxyCommandObject(), and lldb_private::CommandObject::WantsRawCommandString().
|
friend |
Definition at line 138 of file CommandObjectMultiword.h.
References CommandInterpreter.
Referenced by CommandInterpreter, CommandObjectProcessPlugin::CommandObjectProcessPlugin(), CommandObjectProxy(), and lldb_private::CommandObjectTraceProxy::CommandObjectTraceProxy().
|
friend |
Definition at line 139 of file CommandObjectMultiword.h.
References CommandObjectSyntax.
Referenced by CommandObjectSyntax.