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 () |
virtual llvm::StringRef | GetHelp () |
virtual llvm::StringRef | GetHelpLong () |
virtual llvm::StringRef | GetSyntax () |
llvm::StringRef | GetCommandName () const |
virtual void | SetHelp (llvm::StringRef str) |
virtual void | SetHelpLong (llvm::StringRef str) |
void | SetSyntax (llvm::StringRef str) |
virtual bool | IsRemovable () const |
virtual bool | IsMultiwordObject () |
bool | IsUserCommand () |
void | SetIsUserCommand (bool is_user) |
virtual CommandObjectMultiword * | GetAsMultiwordCommand () |
virtual bool | IsAlias () |
virtual bool | IsDashDashCommand () |
virtual lldb::CommandObjectSP | GetSubcommandSP (llvm::StringRef sub_cmd, StringList *matches=nullptr) |
virtual lldb::CommandObjectSP | GetSubcommandSPExact (llvm::StringRef sub_cmd) |
virtual CommandObject * | GetSubcommandObject (llvm::StringRef sub_cmd, StringList *matches=nullptr) |
void | FormatLongHelpText (Stream &output_strm, llvm::StringRef long_help) |
void | GenerateHelpText (CommandReturnObject &result) |
virtual void | GenerateHelpText (Stream &result) |
virtual bool | LoadSubCommand (llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) |
virtual llvm::Error | LoadUserSubcommand (llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj, bool can_replace) |
virtual bool | WantsRawCommandString ()=0 |
virtual bool | WantsCompletion () |
virtual Options * | GetOptions () |
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) |
virtual void | HandleCompletion (CompletionRequest &request) |
This default version handles calling option argument completions and then calls HandleArgumentCompletion if the cursor is on an argument, not an option. | |
virtual void | HandleArgumentCompletion (CompletionRequest &request, OptionElementVector &opt_element_vector) |
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. | |
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. | |
virtual std::optional< std::string > | GetRepeatCommand (Args ¤t_command_args, uint32_t index) |
Get the command that appropriate for a "repeat" of the current command. | |
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) |
virtual void | Execute (const char *args_string, CommandReturnObject &result)=0 |
Friends | |
class | CommandInterpreter |
class | CommandObjectSyntax |
Definition at line 77 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 301 of file CommandObjectMultiword.cpp.
|
overridedefault |
|
overridevirtual |
Implements lldb_private::CommandObject.
Definition at line 431 of file CommandObjectMultiword.cpp.
References lldb_private::CommandReturnObject::AppendError(), GetProxyCommandObject(), and GetUnsupportedError().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 358 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::GenerateHelpText(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 351 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::GetAsMultiwordCommand(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 315 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::GetHelp(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 329 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::GetHelpLong(), and GetProxyCommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 308 of file CommandObjectMultiword.cpp.
References lldb_private::CommandObject::GetOptions(), and GetProxyCommandObject().
|
pure virtual |
Implemented in CommandObjectProcessPlugin, and lldb_private::CommandObjectTraceProxy.
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 419 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::GetRepeatCommand().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 375 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::GetSubcommandObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 367 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::GetSubcommandSP().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 322 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::GetSyntax().
|
virtual |
Reimplemented in lldb_private::CommandObjectTraceProxy.
Definition at line 427 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 411 of file CommandObjectMultiword.cpp.
References 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 405 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::HandleCompletion().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 344 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::IsMultiwordObject().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 336 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::IsRemovable().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 383 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::LoadSubCommand().
|
overridevirtual |
Reimplemented from lldb_private::CommandObject.
Definition at line 398 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::WantsCompletion().
|
overridevirtual |
Implements lldb_private::CommandObject.
Definition at line 391 of file CommandObjectMultiword.cpp.
References GetProxyCommandObject(), and lldb_private::CommandObject::WantsRawCommandString().
|
friend |
Definition at line 136 of file CommandObjectMultiword.h.
|
friend |
Definition at line 137 of file CommandObjectMultiword.h.