LLDB mainline
|
#include <MinidumpParser.h>
Public Member Functions | |
llvm::ArrayRef< uint8_t > | GetData () |
llvm::ArrayRef< uint8_t > | GetStream (StreamType stream_type) |
UUID | GetModuleUUID (const minidump::Module *module) |
llvm::ArrayRef< minidump::Thread > | GetThreads () |
llvm::ArrayRef< uint8_t > | GetThreadContext (const LocationDescriptor &location) |
llvm::ArrayRef< uint8_t > | GetThreadContext (const minidump::Thread &td) |
llvm::ArrayRef< uint8_t > | GetThreadContextWow64 (const minidump::Thread &td) |
ArchSpec | GetArchitecture () |
const MinidumpMiscInfo * | GetMiscInfo () |
std::optional< LinuxProcStatus > | GetLinuxProcStatus () |
std::optional< lldb::pid_t > | GetPid () |
llvm::ArrayRef< minidump::Module > | GetModuleList () |
std::vector< const minidump::Module * > | GetFilteredModuleList () |
const llvm::minidump::ExceptionStream * | GetExceptionStream () |
std::optional< Range > | FindMemoryRange (lldb::addr_t addr) |
llvm::ArrayRef< uint8_t > | GetMemory (lldb::addr_t addr, size_t size) |
std::pair< MemoryRegionInfos, bool > | BuildMemoryRegions () |
Returns a list of memory regions and a flag indicating whether the list is complete (includes all regions mapped into the process memory). | |
llvm::iterator_range< FallibleMemory64Iterator > | GetMemory64Iterator (llvm::Error &err) |
llvm::object::MinidumpFile & | GetMinidumpFile () |
Static Public Member Functions | |
static llvm::Expected< MinidumpParser > | Create (const lldb::DataBufferSP &data_buf_sp) |
static llvm::StringRef | GetStreamTypeAsString (StreamType stream_type) |
static MemoryRegionInfo | GetMemoryRegionInfo (const MemoryRegionInfos ®ions, lldb::addr_t load_addr) |
Private Member Functions | |
MinidumpParser (lldb::DataBufferSP data_sp, std::unique_ptr< llvm::object::MinidumpFile > file) | |
Private Attributes | |
lldb::DataBufferSP | m_data_sp |
std::unique_ptr< llvm::object::MinidumpFile > | m_file |
ArchSpec | m_arch |
Definition at line 52 of file MinidumpParser.h.
|
private |
Definition at line 39 of file MinidumpParser.cpp.
std::pair< MemoryRegionInfos, bool > MinidumpParser::BuildMemoryRegions | ( | ) |
Returns a list of memory regions and a flag indicating whether the list is complete (includes all regions mapped into the process memory).
Definition at line 586 of file MinidumpParser.cpp.
References CreateRegionsCacheFromLinuxMaps(), CreateRegionsCacheFromMemoryInfoList(), and CreateRegionsCacheFromMemoryList().
|
static |
Definition at line 30 of file MinidumpParser.cpp.
Referenced by lldb_private::minidump::ProcessMinidump::DoLoadCore().
std::optional< minidump::Range > MinidumpParser::FindMemoryRange | ( | lldb::addr_t | addr | ) |
Definition at line 431 of file MinidumpParser.cpp.
References GetData(), lldb_private::GetLog(), GetMinidumpFile(), GetStream(), LLDB_LOG_ERROR, and lldb_private::Modules.
Referenced by GetMemory().
ArchSpec MinidumpParser::GetArchitecture | ( | ) |
Definition at line 136 of file MinidumpParser.cpp.
References lldb_private::GetLog(), lldb_private::ArchSpec::IsValid(), LLDB_LOG_ERROR, m_arch, m_file, lldb_private::Process, and lldb_private::ArchSpec::SetTriple().
Referenced by GetModuleUUID().
llvm::ArrayRef< uint8_t > MinidumpParser::GetData | ( | ) |
Definition at line 43 of file MinidumpParser.cpp.
References m_data_sp.
Referenced by FindMemoryRange(), GetModuleUUID(), and GetThreadContext().
const minidump::ExceptionStream * MinidumpParser::GetExceptionStream | ( | ) |
Definition at line 420 of file MinidumpParser.cpp.
References lldb_private::GetLog(), GetMinidumpFile(), LLDB_LOG_ERROR, and lldb_private::Process.
std::vector< const minidump::Module * > MinidumpParser::GetFilteredModuleList | ( | ) |
Definition at line 344 of file MinidumpParser.cpp.
References CheckForLinuxExecutable(), CreateRegionsCacheFromLinuxMaps(), lldb_private::GetLog(), GetMinidumpFile(), LLDB_LOG_ERROR, m_file, and lldb_private::Modules.
std::optional< LinuxProcStatus > MinidumpParser::GetLinuxProcStatus | ( | ) |
Definition at line 224 of file MinidumpParser.cpp.
References GetStream(), and lldb_private::minidump::LinuxProcStatus::Parse().
Referenced by GetPid().
llvm::ArrayRef< uint8_t > MinidumpParser::GetMemory | ( | lldb::addr_t | addr, |
size_t | size | ||
) |
Definition at line 475 of file MinidumpParser.cpp.
References FindMemoryRange().
Referenced by GetThreadContextWow64().
llvm::iterator_range< FallibleMemory64Iterator > MinidumpParser::GetMemory64Iterator | ( | llvm::Error & | err | ) |
Definition at line 498 of file MinidumpParser.cpp.
References m_file.
Referenced by CreateRegionsCacheFromMemoryList().
|
static |
Definition at line 664 of file MinidumpParser.cpp.
References lldb_private::MemoryRegionInfo::eNo, lldb_private::MemoryRegionInfo::GetRange(), lldb_private::MemoryRegionInfo::SetExecutable(), lldb_private::MemoryRegionInfo::SetMapped(), lldb_private::Range< B, S >::SetRangeBase(), lldb_private::Range< B, S >::SetRangeEnd(), lldb_private::MemoryRegionInfo::SetReadable(), lldb_private::MemoryRegionInfo::SetWritable(), and UINT64_MAX.
Referenced by lldb_private::minidump::ProcessMinidump::BuildMemoryRegions(), CheckForLinuxExecutable(), and lldb_private::minidump::ProcessMinidump::DoGetMemoryRegionInfo().
|
inline |
Definition at line 101 of file MinidumpParser.h.
References m_file.
Referenced by CreateRegionsCacheFromMemoryInfoList(), CreateRegionsCacheFromMemoryList(), CommandObjectProcessMinidumpDump::DoExecute(), FindMemoryRange(), GetExceptionStream(), GetFilteredModuleList(), GetModuleList(), and GetThreads().
const MinidumpMiscInfo * MinidumpParser::GetMiscInfo | ( | ) |
Definition at line 215 of file MinidumpParser.cpp.
References GetStream(), and lldb_private::minidump::MinidumpMiscInfo::Parse().
Referenced by GetPid().
llvm::ArrayRef< minidump::Module > MinidumpParser::GetModuleList | ( | ) |
Definition at line 247 of file MinidumpParser.cpp.
References lldb_private::GetLog(), GetMinidumpFile(), LLDB_LOG_ERROR, and lldb_private::Modules.
UUID MinidumpParser::GetModuleUUID | ( | const minidump::Module * | module | ) |
Definition at line 52 of file MinidumpParser.cpp.
References lldb_private::UUID::CvRecordPdb70::Age, lldb_private::minidump::consumeObject(), lldb_private::minidump::ElfBuildId, error(), GetArchitecture(), GetData(), lldb_private::minidump::Pdb70, and lldb_private::UUID::CvRecordPdb70::Uuid.
std::optional< lldb::pid_t > MinidumpParser::GetPid | ( | ) |
Definition at line 233 of file MinidumpParser.cpp.
References GetLinuxProcStatus(), GetMiscInfo(), and lldb_private::minidump::MinidumpMiscInfo::GetPid().
llvm::ArrayRef< uint8_t > MinidumpParser::GetStream | ( | StreamType | stream_type | ) |
Definition at line 48 of file MinidumpParser.cpp.
References m_file.
Referenced by CreateRegionsCacheFromLinuxMaps(), CreateRegionsCacheFromMemoryList(), CommandObjectProcessMinidumpDump::DoExecute(), FindMemoryRange(), GetLinuxProcStatus(), and GetMiscInfo().
|
static |
Definition at line 611 of file MinidumpParser.cpp.
References ENUM_TO_CSTR, and lldb_private::Exception.
Referenced by CommandObjectProcessMinidumpDump::DoExecute().
llvm::ArrayRef< uint8_t > MinidumpParser::GetThreadContext | ( | const LocationDescriptor & | location | ) |
Definition at line 94 of file MinidumpParser.cpp.
References GetData().
Referenced by GetThreadContext().
llvm::ArrayRef< uint8_t > MinidumpParser::GetThreadContext | ( | const minidump::Thread & | td | ) |
Definition at line 101 of file MinidumpParser.cpp.
References GetThreadContext().
llvm::ArrayRef< uint8_t > MinidumpParser::GetThreadContextWow64 | ( | const minidump::Thread & | td | ) |
Definition at line 106 of file MinidumpParser.cpp.
References lldb_private::minidump::consumeObject(), error(), GetMemory(), and lldb_private::minidump::TEB64::tls_slots.
llvm::ArrayRef< minidump::Thread > MinidumpParser::GetThreads | ( | ) |
Definition at line 83 of file MinidumpParser.cpp.
References lldb_private::GetLog(), GetMinidumpFile(), LLDB_LOG_ERROR, and lldb_private::Thread.
|
private |
Definition at line 112 of file MinidumpParser.h.
Referenced by GetArchitecture().
|
private |
Definition at line 110 of file MinidumpParser.h.
Referenced by GetData().
|
private |
Definition at line 111 of file MinidumpParser.h.
Referenced by GetArchitecture(), GetFilteredModuleList(), GetMemory64Iterator(), GetMinidumpFile(), and GetStream().