LLDB  mainline
Functions
MinidumpFileBuilder.cpp File Reference
#include "MinidumpFileBuilder.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/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/DataExtractor.h"
#include "lldb/Utility/RegisterValue.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Minidump.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/Error.h"
#include "Plugins/Process/minidump/MinidumpTypes.h"
#include <cinttypes>
Include dependency graph for MinidumpFileBuilder.cpp:

Go to the source code of this file.

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, const std::string &reg_name)
 
uint32_t read_register_u32_raw (RegisterContext *reg_ctx, const std::string &reg_name)
 
uint64_t read_register_u64_raw (RegisterContext *reg_ctx, const std::string &reg_name)
 
llvm::support::ulittle16_t read_register_u16 (RegisterContext *reg_ctx, const std::string &reg_name)
 
llvm::support::ulittle32_t read_register_u32 (RegisterContext *reg_ctx, const std::string &reg_name)
 
llvm::support::ulittle64_t read_register_u64 (RegisterContext *reg_ctx, const std::string &reg_name)
 
lldb_private::minidump::MinidumpContext_x86_64 GetThreadContext_64 (RegisterContext *reg_ctx)
 
llvm::Expected< std::pair< addr_t, addr_t > > findStackHelper (const lldb::ProcessSP &process_sp, uint64_t rsp)
 
std::unique_ptr< llvm::MemoryBuffer > getFileStreamHelper (const std::string &path)
 

Function Documentation

◆ findStackHelper()

llvm::Expected<std::pair<addr_t, addr_t> > findStackHelper ( const lldb::ProcessSP &  process_sp,
uint64_t  rsp 
)

◆ getFileStreamHelper()

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

Definition at line 655 of file MinidumpFileBuilder.cpp.

Referenced by MinidumpFileBuilder::AddLinuxFileStreams().

◆ getModuleFileSize()

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

◆ GetThreadContext_64()

Definition at line 349 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::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 MinidumpFileBuilder::AddException(), and MinidumpFileBuilder::AddThreadList().

◆ read_register_u16()

llvm::support::ulittle16_t read_register_u16 ( RegisterContext reg_ctx,
const std::string reg_name 
)

Definition at line 330 of file MinidumpFileBuilder.cpp.

References read_register_u16_raw().

Referenced by GetThreadContext_64().

◆ read_register_u16_raw()

uint16_t read_register_u16_raw ( RegisterContext reg_ctx,
const std::string reg_name 
)

◆ read_register_u32()

llvm::support::ulittle32_t read_register_u32 ( RegisterContext reg_ctx,
const std::string reg_name 
)

Definition at line 336 of file MinidumpFileBuilder.cpp.

References read_register_u32_raw().

Referenced by GetThreadContext_64().

◆ read_register_u32_raw()

uint32_t read_register_u32_raw ( RegisterContext reg_ctx,
const std::string reg_name 
)

◆ read_register_u64()

llvm::support::ulittle64_t read_register_u64 ( RegisterContext reg_ctx,
const std::string reg_name 
)

◆ read_register_u64_raw()

uint64_t read_register_u64_raw ( RegisterContext reg_ctx,
const std::string reg_name 
)

◆ WriteString()

Status WriteString ( const std::string to_write,
lldb_private::DataBufferHeap buffer 
)