22#define LLDB_OPTIONS_diagnostics_dump
23#include "CommandOptions.inc"
30 "Dump diagnostics to disk", nullptr) {}
45 switch (short_option) {
50 llvm_unreachable(
"Unimplemented option");
60 return llvm::ArrayRef(g_diagnostics_dump_options);
74 return llvm::errorCodeToError(ec);
84 result.
AppendError(llvm::toString(directory.takeError()));
91 directory->GetPath().c_str());
96 result.
GetOutputStream() <<
"diagnostics written to " << *directory <<
'\n';
108 "Commands controlling LLDB diagnostics.",
109 "diagnostics <subcommand> [<command-options>]") {
static llvm::raw_ostream & error(Stream &strm)
~CommandOptions() override=default
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
void OptionParsingStarting(ExecutionContext *execution_context) override
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg, ExecutionContext *execution_context) override
Set the value of an option.
Options * GetOptions() override
llvm::Expected< FileSpec > GetDirectory()
void DoExecute(Args &args, CommandReturnObject &result) override
~CommandObjectDiagnosticsDump() override=default
CommandObjectDiagnosticsDump(CommandInterpreter &interpreter)
A command line argument class.
CommandObjectDiagnostics(CommandInterpreter &interpreter)
~CommandObjectDiagnostics() override
bool LoadSubCommand(llvm::StringRef cmd_name, const lldb::CommandObjectSP &command_obj) override
void void AppendError(llvm::StringRef in_string)
void SetStatus(lldb::ReturnStatus status)
void AppendErrorWithFormat(const char *format,...) __attribute__((format(printf
Stream & GetOutputStream()
llvm::Error Create(const FileSpec &dir)
Gather diagnostics in the given directory.
static llvm::Expected< FileSpec > CreateUniqueDirectory()
Create a unique diagnostic directory.
static Diagnostics & Instance()
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void SetDirectory(ConstString directory)
Directory string set accessor.
size_t GetPath(char *path, size_t max_path_length, bool denormalize=true) const
Extract the full path to the file.
void Clear()
Clears the object state.
A command line option parsing protocol class.
std::vector< Option > m_getopt_table
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::CommandObject > CommandObjectSP
@ eReturnStatusSuccessFinishResult