16#ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H
17#define LLDB_SOURCE_PLUGINS_OBJECTFILE_MINIDUMP_MINIDUMPFILEBUILDER_H
22#include <unordered_map>
33#include "llvm/BinaryFormat/Minidump.h"
34#include "llvm/Object/Minidump.h"
135 uint64_t stream_size);
144 std::unordered_map<lldb::addr_t, llvm::minidump::Thread>
160 static constexpr size_t HEADER_SIZE =
sizeof(llvm::minidump::Header);
166 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 AddMemoryList_64(lldb_private::Process::CoreFileMemoryRanges &ranges)
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
std::unordered_set< lldb::addr_t > m_saved_stack_ranges
lldb_private::Status AddDirectory(llvm::minidump::StreamType type, uint64_t stream_size)
MinidumpFileBuilder & operator=(MinidumpFileBuilder &&other)=default
lldb_private::Status FixThreadStacks()
lldb::ProcessSP m_process_sp
lldb_private::Status AddMemoryList_32(lldb_private::Process::CoreFileMemoryRanges &ranges)
static constexpr size_t HEADER_SIZE
lldb::offset_t GetCurrentDataEndOffset() const
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
MinidumpFileBuilder & operator=(const MinidumpFileBuilder &)=delete
MinidumpFileBuilder(const MinidumpFileBuilder &)=delete
A subclass of DataBuffer that stores a data buffer on the heap.
std::vector< CoreFileMemoryRange > CoreFileMemoryRanges
std::unique_ptr< lldb_private::File > FileUP
std::shared_ptr< lldb_private::Process > ProcessSP