LLDB mainline
Classes | Functions
MinidumpFileBuilder.cpp File Reference
#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/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>

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)
 
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 717 of file MinidumpFileBuilder.cpp.

Referenced by MinidumpFileBuilder::AddLinuxFileStreams().

◆ getModuleFileSize()

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

◆ GetThreadContext_ARM64()

◆ GetThreadContext_x86_64()

lldb_private::minidump::MinidumpContext_x86_64 GetThreadContext_x86_64 ( RegisterContext reg_ctx)

Definition at line 368 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().

◆ read_register_u128()

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

◆ read_register_u16()

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

Definition at line 332 of file MinidumpFileBuilder.cpp.

References read_register_u16_raw().

Referenced by GetThreadContext_x86_64().

◆ read_register_u16_raw()

uint16_t read_register_u16_raw ( RegisterContext reg_ctx,
llvm::StringRef  reg_name 
)

◆ read_register_u32()

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

Definition at line 338 of file MinidumpFileBuilder.cpp.

References read_register_u32_raw().

Referenced by GetThreadContext_ARM64(), and GetThreadContext_x86_64().

◆ read_register_u32_raw()

uint32_t read_register_u32_raw ( RegisterContext reg_ctx,
llvm::StringRef  reg_name 
)

◆ read_register_u64()

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

Definition at line 344 of file MinidumpFileBuilder.cpp.

References read_register_u64_raw().

Referenced by GetThreadContext_ARM64(), and GetThreadContext_x86_64().

◆ read_register_u64_raw()

uint64_t read_register_u64_raw ( RegisterContext reg_ctx,
llvm::StringRef  reg_name 
)

◆ WriteString()

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