Implement DoReadMemory for Windows mini dumps.
Differential Revision: http://reviews.llvm.org/D12507
llvm-svn: 246558
diff --git a/lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h b/lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
index 1ea7d31..4339014 100644
--- a/lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
+++ b/lldb/source/Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.h
@@ -70,6 +70,9 @@
bool
IsAlive() override;
+ bool
+ WarnBeforeDetach () const override;
+
size_t
ReadMemory(lldb::addr_t addr, void *buf, size_t size, lldb_private::Error &error) override;
@@ -91,6 +94,19 @@
lldb_private::ThreadList &new_thread_list) override;
private:
+ // Describes a range of memory captured in the mini dump.
+ struct Range {
+ lldb::addr_t start; // virtual address of the beginning of the range
+ size_t size; // size of the range in bytes
+ const uint8_t *ptr; // absolute pointer to the first byte of the range
+ };
+
+ // If the mini dump has a memory range that contains the desired address, it
+ // returns true with the details of the range in *range_out. Otherwise, it
+ // returns false.
+ bool
+ FindMemoryRange(lldb::addr_t addr, Range *range_out) const;
+
lldb_private::Error
MapMiniDumpIntoMemory(const char *file);
@@ -107,7 +123,7 @@
// checks. If there's a failure (e.g., if the requested stream doesn't exist),
// the function returns nullptr and sets *size_out to 0.
void *
- FindDumpStream(unsigned stream_number, size_t *size_out);
+ FindDumpStream(unsigned stream_number, size_t *size_out) const;
// Isolate the data to keep Windows-specific types out of this header. Can't
// use the typical pimpl idiom because the implementation of this class also