22 interpreter,
"apropos",
23 "List debugger commands related to a word or subject.", nullptr) {
33 auto search_word = args[0].ref();
34 if (!search_word.empty()) {
41 search_word, commands_found, commands_help,
true,
true,
true,
true);
43 if (commands_found.
GetSize() == 0) {
45 "Try 'help' to see a complete list of "
46 "debugger commands.\n",
49 if (commands_found.
GetSize() > 0) {
51 "The following commands may relate to '%s':\n", args[0].c_str());
54 for (
size_t i = 0; i < commands_found.
GetSize(); ++i)
61 std::vector<const Property *> properties;
62 const size_t num_properties =
65 const bool dump_qualified_name =
true;
67 "\nThe following settings variables may relate to '{0}': \n\n",
69 for (
size_t i = 0; i < num_properties; ++i)
70 properties[i]->DumpDescription(
76 result.
AppendError(
"'' is not a valid search word.\n");
79 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
void DoExecute(Args &command, CommandReturnObject &result) override
CommandObjectApropos(CommandInterpreter &interpreter)
void AddSimpleArgumentList(lldb::CommandArgumentType arg_type, ArgumentRepetitionType repetition_type=eArgRepeatPlain)
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