16#ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H
17#define LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H
22#include <unordered_map>
35#include "llvm/BinaryFormat/Minidump.h"
36#include "llvm/Object/Minidump.h"
142 uint64_t stream_size);
151 std::unordered_map<
lldb::addr_t,
llvm::minidump::Thread>
173 std::unordered_map<
lldb::tid_t,
llvm::minidump::LocationDescriptor>
lldb_private::Status WriteString(const std::string &to_write, lldb_private::DataBufferHeap *buffer)
Minidump writer for Linux.
lldb_private::Status AddExceptions()
std::unordered_map< lldb::tid_t, llvm::minidump::LocationDescriptor > m_tid_to_reg_ctx
~MinidumpFileBuilder()=default
lldb_private::Status AddThreadList()
lldb_private::Status AddHeaderAndCalculateDirectories()
uint64_t m_saved_data_size
static constexpr size_t DIRECTORY_SIZE
lldb_private::DataBufferHeap m_data
lldb_private::Status AddSystemInfo()
lldb_private::Status AddMemoryList()
std::unordered_map< lldb::addr_t, llvm::minidump::Thread > m_thread_by_range_end
lldb_private::Status AddData(const void *data, uint64_t size)
lldb_private::Status DumpFile()
lldb_private::SaveCoreOptions m_save_core_options
lldb_private::Status FlushBufferToDisk()
size_t m_expected_directories
MinidumpFileBuilder(MinidumpFileBuilder &&other)=default
lldb::offset_t m_thread_list_start
static constexpr size_t MAX_WRITE_CHUNK_SIZE
lldb_private::Status AddDirectory(llvm::minidump::StreamType type, uint64_t stream_size)
MinidumpFileBuilder & operator=(MinidumpFileBuilder &&other)=default
lldb_private::Status FixThreadStacks()
void DeleteFile() noexcept
lldb::ProcessSP m_process_sp
static constexpr size_t HEADER_SIZE
lldb::offset_t GetCurrentDataEndOffset() const
lldb_private::Status AddMemoryList_32(std::vector< lldb_private::CoreFileMemoryRange > &ranges, lldb_private::Progress &progress)
std::vector< llvm::minidump::Directory > m_directories
lldb_private::Status DumpDirectories() const
lldb_private::Status AddLinuxFileStreams()
lldb_private::Status AddModuleList()
MinidumpFileBuilder(lldb::FileUP &&core_file, const lldb::ProcessSP &process_sp, lldb_private::SaveCoreOptions &save_core_options)
lldb_private::Status AddMiscInfo()
lldb_private::Status DumpHeader() const
lldb_private::Status AddMemoryList_64(std::vector< lldb_private::CoreFileMemoryRange > &ranges, lldb_private::Progress &progress)
MinidumpFileBuilder & operator=(const MinidumpFileBuilder &)=delete
MinidumpFileBuilder(const MinidumpFileBuilder &)=delete
A subclass of DataBuffer that stores a data buffer on the heap.
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