9#ifndef LLDB_CORE_DIAGNOSTICS_H
10#define LLDB_CORE_DIAGNOSTICS_H
14#include "llvm/Support/Error.h"
29class ExecutionContext;
73 bool Dump(llvm::raw_ostream &stream);
74 bool Dump(llvm::raw_ostream &stream,
const FileSpec &dir);
78 void Record(llvm::StringRef message);
98 std::vector<std::string> &files);
102 std::vector<std::string> &files);
106 std::vector<std::string> &files);
A class to manage flag bits.
RotatingLogHandler m_log_handler
bool Dump(llvm::raw_ostream &stream)
Write the diagnostic log into a directory and print a message to the given output stream.
static std::string GetInvocation()
static std::string GetHostDescription(const ExecutionContext &exe_ctx)
Scalars carried in the report rather than written as files.
llvm::Error DumpDiangosticsLog(const FileSpec &dir) const
void CollectLogs(Debugger &debugger, const FileSpec &dir, std::vector< std::string > &files)
Collect the individual parts of the bundle into dir, appending the name of each file to files as it i...
llvm::Error Create(const FileSpec &dir)
Write the in-memory diagnostic log into the given directory.
void Record(llvm::StringRef message)
Record a diagnostic message into the always-on, in-memory log.
static llvm::Expected< FileSpec > CreateUniqueDirectory()
Create a unique diagnostic directory.
static std::optional< Diagnostics > & InstanceImpl()
llvm::Expected< Report > Collect(Debugger &debugger, const ExecutionContext &exe_ctx, const FileSpec &dir)
Collect a full diagnostics bundle into dir and return its report.
static void CollectCommands(Debugger &debugger, const ExecutionContext &exe_ctx, const FileSpec &dir, std::vector< std::string > &files)
static Diagnostics & Instance()
static void CollectStatistics(Debugger &debugger, const ExecutionContext &exe_ctx, const FileSpec &dir, std::vector< std::string > &files)
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that represents a running process on the host machine.
llvm::json::Value toJSON(const Diagnostics::Report &report)
Render a diagnostics report as JSON, for diagnostics dump's terminal output.
The bundle directory and the files written into it, recorded as each one is created so a file that co...
std::vector< std::string > files
The state a triager needs to make sense of a bug report.