20#include "llvm/Support/FileSystem.h"
29 GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance,
30 CreateMemoryInstance, GetModuleSpecifications, SaveCore);
81 if (options.
GetStyle() == SaveCoreStyle::eSaveCoreUnspecified)
82 options.
SetStyle(SaveCoreStyle::eSaveCoreStackOnly);
87 if (!maybe_core_file) {
98 LLDB_LOGF(log,
"AddHeaderAndCalculateDirectories failed: %s",
127 LLDB_LOGF(log,
"AddLinuxFileStreams failed: %s",
error.AsCString());
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_LOGF(log,...)
Structure holding data neccessary for minidump file creation.
Placeholder plugin for the save core functionality.
#define LLDB_PLUGIN_DEFINE(PluginName)
Minidump writer for Linux.
lldb_private::Status AddExceptions()
lldb_private::Status AddThreadList()
lldb_private::Status AddHeaderAndCalculateDirectories()
lldb_private::Status AddSystemInfo()
lldb_private::Status AddMemoryList()
lldb_private::Status DumpFile()
void DeleteFile() noexcept
lldb_private::Status AddLinuxFileStreams()
lldb_private::Status AddModuleList()
lldb_private::Status AddMiscInfo()
static lldb_private::ObjectFile * CreateInstance(const lldb::ModuleSP &module_sp, lldb::DataBufferSP data_sp, lldb::offset_t data_offset, const lldb_private::FileSpec *file, lldb::offset_t offset, lldb::offset_t length)
static size_t GetModuleSpecifications(const lldb_private::FileSpec &file, lldb::DataBufferSP &data_sp, lldb::offset_t data_offset, lldb::offset_t file_offset, lldb::offset_t length, lldb_private::ModuleSpecList &specs)
static lldb_private::ObjectFile * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
static bool SaveCore(const lldb::ProcessSP &process_sp, lldb_private::SaveCoreOptions &options, lldb_private::Status &error)
int Open(const char *path, int flags, int mode=0600)
Wraps ::open in a platform-independent way.
static FileSystem & Instance()
A plug-in interface definition class for object file parsers.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
const std::optional< lldb_private::FileSpec > GetOutputFile() const
lldb::SaveCoreStyle GetStyle() const
void SetStyle(lldb::SaveCoreStyle style)
static Status FromError(llvm::Error error)
Avoid using this in new code. Migrate APIs to llvm::Expected instead.
A class that represents a running process on the host machine.
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
std::shared_ptr< lldb_private::Process > ProcessSP
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
std::shared_ptr< lldb_private::Module > ModuleSP
DumpFailRemoveHolder(MinidumpFileBuilder &builder)
MinidumpFileBuilder & m_builder