diff options
Diffstat (limited to 'lldb/source/Plugins/Process/minidump/MinidumpParser.h')
-rw-r--r-- | lldb/source/Plugins/Process/minidump/MinidumpParser.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/lldb/source/Plugins/Process/minidump/MinidumpParser.h b/lldb/source/Plugins/Process/minidump/MinidumpParser.h index 76a8ece00b2..686d0f39f6e 100644 --- a/lldb/source/Plugins/Process/minidump/MinidumpParser.h +++ b/lldb/source/Plugins/Process/minidump/MinidumpParser.h @@ -1,12 +1,11 @@ -//===-- MinidumpParser.h -----------------------------------------*- C++ -//-*-===// +//===-- MinidumpParser.h ---------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===----------------------------------------------------------------------===// +//===--------------------------------------------------------------------===// #ifndef liblldb_MinidumpParser_h_ #define liblldb_MinidumpParser_h_ @@ -25,15 +24,22 @@ #include "llvm/ADT/StringRef.h" // C includes - // C++ includes -#include <cstring> -#include <unordered_map> namespace lldb_private { namespace minidump { +// Describes a range of memory captured in the Minidump +struct Range { + lldb::addr_t start; // virtual address of the beginning of the range + // range_ref - absolute pointer to the first byte of the range and size + llvm::ArrayRef<uint8_t> range_ref; + + Range(lldb::addr_t start, llvm::ArrayRef<uint8_t> range_ref) + : start(start), range_ref(range_ref) {} +}; + class MinidumpParser { public: static llvm::Optional<MinidumpParser> @@ -47,6 +53,8 @@ public: llvm::ArrayRef<MinidumpThread> GetThreads(); + llvm::ArrayRef<uint8_t> GetThreadContext(const MinidumpThread &td); + const MinidumpSystemInfo *GetSystemInfo(); ArchSpec GetArchitecture(); @@ -61,6 +69,8 @@ public: const MinidumpExceptionStream *GetExceptionStream(); + llvm::Optional<Range> FindMemoryRange(lldb::addr_t addr); + private: lldb::DataBufferSP m_data_sp; const MinidumpHeader *m_header; |