LLDB mainline
|
#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>
Go to the source code of this file.
Classes | |
class | ArchThreadContexts |
Functions | |
Status | WriteString (const std::string &to_write, lldb_private::DataBufferHeap *buffer) |
llvm::Expected< uint64_t > | getModuleFileSize (Target &target, const ModuleSP &mod) |
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) |
std::unique_ptr< llvm::MemoryBuffer > | getFileStreamHelper (const std::string &path) |
static uint64_t | GetLargestRangeSize (const Process::CoreFileMemoryRanges &ranges) |
std::unique_ptr< llvm::MemoryBuffer > getFileStreamHelper | ( | const std::string & | path | ) |
Definition at line 760 of file MinidumpFileBuilder.cpp.
Referenced by MinidumpFileBuilder::AddLinuxFileStreams().
|
static |
Definition at line 952 of file MinidumpFileBuilder.cpp.
Referenced by MinidumpFileBuilder::AddMemoryList_32(), and MinidumpFileBuilder::AddMemoryList_64().
Definition at line 238 of file MinidumpFileBuilder.cpp.
References lldb_private::Address::GetSection(), and lldb_private::Target::ResolveLoadAddress().
Referenced by MinidumpFileBuilder::AddModuleList().
minidump::RegisterContextMinidump_ARM64::Context GetThreadContext_ARM64 | ( | RegisterContext * | reg_ctx | ) |
Definition at line 501 of file MinidumpFileBuilder.cpp.
References lldb_private::minidump::RegisterContextMinidump_ARM64::Context::context_flags, lldb_private::minidump::RegisterContextMinidump_ARM64::Context::cpsr, lldb_private::minidump::RegisterContextMinidump_ARM64::Context::fpcr, lldb_private::minidump::RegisterContextMinidump_ARM64::Context::fpsr, lldb_private::minidump::RegisterContextMinidump_ARM64::Context::pc, read_register_u128(), read_register_u32(), read_register_u64(), lldb_private::minidump::RegisterContextMinidump_ARM64::Context::v, and lldb_private::minidump::RegisterContextMinidump_ARM64::Context::x.
Referenced by ArchThreadContexts::prepareRegisterContext().
lldb_private::minidump::MinidumpContext_x86_64 GetThreadContext_x86_64 | ( | RegisterContext * | reg_ctx | ) |
Definition at line 466 of file MinidumpFileBuilder.cpp.
References lldb_private::minidump::MinidumpContext_x86_64::context_flags, lldb_private::minidump::Control, lldb_private::minidump::MinidumpContext_x86_64::cs, lldb_private::minidump::MinidumpContext_x86_64::ds, lldb_private::minidump::MinidumpContext_x86_64::eflags, lldb_private::minidump::MinidumpContext_x86_64::fs, lldb_private::minidump::MinidumpContext_x86_64::gs, lldb_private::minidump::Integer, lldb_private::minidump::MinidumpContext_x86_64::p1_home, lldb_private::minidump::MinidumpContext_x86_64::r10, lldb_private::minidump::MinidumpContext_x86_64::r11, lldb_private::minidump::MinidumpContext_x86_64::r12, lldb_private::minidump::MinidumpContext_x86_64::r13, lldb_private::minidump::MinidumpContext_x86_64::r14, lldb_private::minidump::MinidumpContext_x86_64::r15, lldb_private::minidump::MinidumpContext_x86_64::r8, lldb_private::minidump::MinidumpContext_x86_64::r9, lldb_private::minidump::MinidumpContext_x86_64::rax, lldb_private::minidump::MinidumpContext_x86_64::rbp, lldb_private::minidump::MinidumpContext_x86_64::rbx, lldb_private::minidump::MinidumpContext_x86_64::rcx, lldb_private::minidump::MinidumpContext_x86_64::rdi, lldb_private::minidump::MinidumpContext_x86_64::rdx, read_register_u16(), read_register_u32(), read_register_u64(), lldb_private::minidump::MinidumpContext_x86_64::rip, lldb_private::minidump::MinidumpContext_x86_64::rsi, lldb_private::minidump::MinidumpContext_x86_64::rsp, lldb_private::minidump::Segments, lldb_private::minidump::MinidumpContext_x86_64::ss, and lldb_private::minidump::x86_64_Flag.
Referenced by ArchThreadContexts::prepareRegisterContext().
void read_register_u128 | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name, | ||
uint8_t * | dst | ||
) |
Definition at line 448 of file MinidumpFileBuilder.cpp.
References lldb::eByteOrderLittle, error(), lldb_private::RegisterValue::GetAsMemoryData(), lldb_private::RegisterContext::GetRegisterInfoByName(), and lldb_private::RegisterContext::ReadRegister().
Referenced by GetThreadContext_ARM64().
llvm::support::ulittle16_t read_register_u16 | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 430 of file MinidumpFileBuilder.cpp.
References read_register_u16_raw().
Referenced by GetThreadContext_x86_64().
uint16_t read_register_u16_raw | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 394 of file MinidumpFileBuilder.cpp.
References lldb_private::RegisterValue::GetAsUInt16(), lldb_private::RegisterContext::GetRegisterInfoByName(), and lldb_private::RegisterContext::ReadRegister().
Referenced by read_register_u16().
llvm::support::ulittle32_t read_register_u32 | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 436 of file MinidumpFileBuilder.cpp.
References read_register_u32_raw().
Referenced by GetThreadContext_ARM64(), and GetThreadContext_x86_64().
uint32_t read_register_u32_raw | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 406 of file MinidumpFileBuilder.cpp.
References lldb_private::RegisterValue::GetAsUInt32(), lldb_private::RegisterContext::GetRegisterInfoByName(), and lldb_private::RegisterContext::ReadRegister().
Referenced by read_register_u32().
llvm::support::ulittle64_t read_register_u64 | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 442 of file MinidumpFileBuilder.cpp.
References read_register_u64_raw().
Referenced by GetThreadContext_ARM64(), and GetThreadContext_x86_64().
uint64_t read_register_u64_raw | ( | RegisterContext * | reg_ctx, |
llvm::StringRef | reg_name | ||
) |
Definition at line 418 of file MinidumpFileBuilder.cpp.
References lldb_private::RegisterValue::GetAsUInt64(), lldb_private::RegisterContext::GetRegisterInfoByName(), and lldb_private::RegisterContext::ReadRegister().
Referenced by read_register_u64().
Status WriteString | ( | const std::string & | to_write, |
lldb_private::DataBufferHeap * | buffer | ||
) |
Definition at line 213 of file MinidumpFileBuilder.cpp.
References lldb_private::DataBufferHeap::AppendData(), and error().
Referenced by MinidumpFileBuilder::AddModuleList(), and MinidumpFileBuilder::AddSystemInfo().