diff options
Diffstat (limited to 'lldb/source/Plugins/Process/minidump/MinidumpParser.h')
-rw-r--r-- | lldb/source/Plugins/Process/minidump/MinidumpParser.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/minidump/MinidumpParser.h b/lldb/source/Plugins/Process/minidump/MinidumpParser.h index 76a8ece00b2..202ef37d8cd 100644 --- a/lldb/source/Plugins/Process/minidump/MinidumpParser.h +++ b/lldb/source/Plugins/Process/minidump/MinidumpParser.h @@ -34,6 +34,16 @@ 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 +57,8 @@ public: llvm::ArrayRef<MinidumpThread> GetThreads(); + llvm::ArrayRef<uint8_t> GetThreadContext(const MinidumpThread &td); + const MinidumpSystemInfo *GetSystemInfo(); ArchSpec GetArchitecture(); @@ -59,8 +71,20 @@ public: llvm::ArrayRef<MinidumpModule> GetModuleList(); + // There are cases in which there is more than one record in the ModuleList + // for the same module name.(e.g. when the binary has non contiguous segments) + // So this function returns a filtered module list - if it finds records that + // have the same name, it keeps the copy with the lowest load address. + std::vector<const MinidumpModule *> GetFilteredModuleList(); + const MinidumpExceptionStream *GetExceptionStream(); + llvm::Optional<Range> FindMemoryRange(lldb::addr_t addr); + + llvm::ArrayRef<uint8_t> GetMemory(lldb::addr_t addr, size_t size); + + llvm::Optional<MemoryRegionInfo> GetMemoryRegionInfo(lldb::addr_t); + private: lldb::DataBufferSP m_data_sp; const MinidumpHeader *m_header; |