18#include "llvm/Support/FileSystem.h"
27 GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance,
28 CreateMemoryInstance, GetModuleSpecifications, SaveCore);
61 if (core_style == SaveCoreStyle::eSaveCoreUnspecified)
62 core_style = SaveCoreStyle::eSaveCoreStackOnly;
69 Target &target = process_sp->GetTarget();
93 llvm::Triple::OSType::Linux) {
99 if (!maybe_core_file) {
100 error = maybe_core_file.takeError();
103 lldb::FileUP core_file = std::move(maybe_core_file.get());
static llvm::raw_ostream & error(Stream &strm)
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 Dump(lldb::FileUP &core_file) const
lldb_private::Status AddModuleList(lldb_private::Target &target)
void AddExceptions(const lldb::ProcessSP &process_sp)
void AddLinuxFileStreams(const lldb::ProcessSP &process_sp)
void AddMiscInfo(const lldb::ProcessSP &process_sp)
lldb_private::Status AddSystemInfo(const llvm::Triple &target_triple)
lldb_private::Status AddMemoryList(const lldb::ProcessSP &process_sp, lldb::SaveCoreStyle core_style)
lldb_private::Status AddThreadList(const lldb::ProcessSP &process_sp)
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 bool SaveCore(const lldb::ProcessSP &process_sp, const lldb_private::FileSpec &outfile, lldb::SaveCoreStyle &core_style, lldb_private::Status &error)
static lldb_private::ObjectFile * CreateMemoryInstance(const lldb::ModuleSP &module_sp, lldb::WritableDataBufferSP data_sp, const lldb::ProcessSP &process_sp, lldb::addr_t header_addr)
llvm::Triple & GetTriple()
Architecture triple accessor.
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 ArchSpec & GetArchitecture() const
A class that represents a running process on the host machine.
std::unique_ptr< lldb_private::File > FileUP
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