22 interpreter,
"apropos",
23 "List debugger commands related to a word or subject.", nullptr) {
33 arg.push_back(search_word_arg);
45 auto search_word = args[0].ref();
46 if (!search_word.empty()) {
53 search_word, commands_found, commands_help,
true,
true,
true,
true);
55 if (commands_found.
GetSize() == 0) {
57 "Try 'help' to see a complete list of "
58 "debugger commands.\n",
61 if (commands_found.
GetSize() > 0) {
63 "The following commands may relate to '%s':\n", args[0].c_str());
66 for (
size_t i = 0; i < commands_found.
GetSize(); ++i)
73 std::vector<const Property *> properties;
74 const size_t num_properties =
77 const bool dump_qualified_name =
true;
79 "\nThe following settings variables may relate to '{0}': \n\n",
81 for (
size_t i = 0; i < num_properties; ++i)
82 properties[i]->DumpDescription(
88 result.
AppendError(
"'' is not a valid search word.\n");
91 result.
AppendError(
"'apropos' must be called with exactly one argument.\n");
A command line argument class.
size_t GetArgumentCount() const
Gets the number of arguments left in this command object.
void OutputFormattedHelpText(Stream &strm, llvm::StringRef prefix, llvm::StringRef help_text)
void FindCommandsForApropos(llvm::StringRef word, StringList &commands_found, StringList &commands_help, bool search_builtin_commands, bool search_user_commands, bool search_alias_commands, bool search_user_mw_commands)
~CommandObjectApropos() override
bool DoExecute(Args &command, CommandReturnObject &result) override
CommandObjectApropos(CommandInterpreter &interpreter)
std::vector< CommandArgumentData > CommandArgumentEntry
std::vector< CommandArgumentEntry > m_arguments
CommandInterpreter & m_interpreter
void void AppendError(llvm::StringRef in_string)
void SetStatus(lldb::ReturnStatus status)
void void AppendMessageWithFormatv(const char *format, Args &&... args)
void AppendMessageWithFormat(const char *format,...) __attribute__((format(printf
Stream & GetOutputStream()
size_t Apropos(llvm::StringRef keyword, std::vector< const Property * > &matching_properties) const
size_t GetMaxStringLength() const
const char * GetStringAtIndex(size_t idx) const
A class that represents a running process on the host machine.
@ eReturnStatusSuccessFinishNoResult
Used to build individual command argument lists.
ArgumentRepetitionType arg_repetition
lldb::CommandArgumentType arg_type