llvm/lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp

//===-- MinidumpFileBuilder.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "MinidumpFileBuilder.h"

#include "Plugins/Process/minidump/RegisterContextMinidump_ARM64.h"
#include "Plugins/Process/minidump/RegisterContextMinidump_x86_64.h"

#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/Section.h"
#include "lldb/Target/ABI.h"
#include "lldb/Target/MemoryRegionInfo.h"
#include "lldb/Target/Process.h"
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/StopInfo.h"
#include "lldb/Target/ThreadList.h"
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RangeMap.h"
#include "lldb/Utility/RegisterValue.h"

#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Minidump.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Error.h"
#include "llvm/TargetParser/Triple.h"

#include "Plugins/Process/minidump/MinidumpTypes.h"
#include "lldb/lldb-enumerations.h"
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"

#include <algorithm>
#include <cinttypes>
#include <climits>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iostream>
#include <set>
#include <utility>
#include <vector>

usingnamespacelldb;
usingnamespacelldb_private;
usingnamespacellvm::minidump;

Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {}

Status MinidumpFileBuilder::AddDirectory(StreamType type,
                                         uint64_t stream_size) {}

Status MinidumpFileBuilder::AddSystemInfo() {}

Status WriteString(const std::string &to_write,
                   lldb_private::DataBufferHeap *buffer) {}

llvm::Expected<uint64_t> getModuleFileSize(Target &target,
                                           const ModuleSP &mod) {}

// ModuleList stream consists of a number of modules, followed by an array
// of llvm::minidump::Module's structures. Every structure informs about a
// single module. Additional data of variable length, such as module's names,
// are stored just after the ModuleList stream. The llvm::minidump::Module
// structures point to this helper data by global offset.
Status MinidumpFileBuilder::AddModuleList() {}

uint16_t read_register_u16_raw(RegisterContext *reg_ctx,
                               llvm::StringRef reg_name) {}

uint32_t read_register_u32_raw(RegisterContext *reg_ctx,
                               llvm::StringRef reg_name) {}

uint64_t read_register_u64_raw(RegisterContext *reg_ctx,
                               llvm::StringRef reg_name) {}

llvm::support::ulittle16_t read_register_u16(RegisterContext *reg_ctx,
                                             llvm::StringRef reg_name) {}

llvm::support::ulittle32_t read_register_u32(RegisterContext *reg_ctx,
                                             llvm::StringRef reg_name) {}

llvm::support::ulittle64_t read_register_u64(RegisterContext *reg_ctx,
                                             llvm::StringRef reg_name) {}

void read_register_u128(RegisterContext *reg_ctx, llvm::StringRef reg_name,
                        uint8_t *dst) {}

lldb_private::minidump::MinidumpContext_x86_64
GetThreadContext_x86_64(RegisterContext *reg_ctx) {}

minidump::RegisterContextMinidump_ARM64::Context
GetThreadContext_ARM64(RegisterContext *reg_ctx) {}

class ArchThreadContexts {};

Status MinidumpFileBuilder::FixThreadStacks() {}

Status MinidumpFileBuilder::AddThreadList() {}

Status MinidumpFileBuilder::AddExceptions() {}

lldb_private::Status MinidumpFileBuilder::AddMiscInfo() {}

std::unique_ptr<llvm::MemoryBuffer>
getFileStreamHelper(const std::string &path) {}

Status MinidumpFileBuilder::AddLinuxFileStreams() {}

Status MinidumpFileBuilder::AddMemoryList() {}

Status MinidumpFileBuilder::DumpHeader() const {}

offset_t MinidumpFileBuilder::GetCurrentDataEndOffset() const {}

Status MinidumpFileBuilder::DumpDirectories() const {}

static uint64_t
GetLargestRangeSize(const std::vector<CoreFileMemoryRange> &ranges) {}

Status
MinidumpFileBuilder::AddMemoryList_32(std::vector<CoreFileMemoryRange> &ranges,
                                      Progress &progress) {}

Status
MinidumpFileBuilder::AddMemoryList_64(std::vector<CoreFileMemoryRange> &ranges,
                                      Progress &progress) {}

Status MinidumpFileBuilder::AddData(const void *data, uint64_t size) {}

Status MinidumpFileBuilder::FlushBufferToDisk() {}

Status MinidumpFileBuilder::DumpFile() {}

void MinidumpFileBuilder::DeleteFile() noexcept {}