Index: snapshot/win/process_snapshot_win.cc |
diff --git a/snapshot/win/process_snapshot_win.cc b/snapshot/win/process_snapshot_win.cc |
index 26de3db3d4c9a467eac2bd20426bafea1d0323cb..98e955c0e3d139e208f22c951b6d53e53f4f5445 100644 |
--- a/snapshot/win/process_snapshot_win.cc |
+++ b/snapshot/win/process_snapshot_win.cc |
@@ -18,6 +18,7 @@ |
#include "base/logging.h" |
#include "base/strings/stringprintf.h" |
+#include "snapshot/win/memory_snapshot_win.h" |
#include "snapshot/win/module_snapshot_win.h" |
#include "util/win/registration_protocol_win.h" |
#include "util/win/time.h" |
@@ -30,6 +31,7 @@ ProcessSnapshotWin::ProcessSnapshotWin() |
threads_(), |
modules_(), |
exception_(), |
+ memory_map_(), |
process_reader_(), |
report_id_(), |
client_id_(), |
@@ -60,6 +62,11 @@ bool ProcessSnapshotWin::Initialize(HANDLE process, |
InitializeThreads(); |
InitializeModules(); |
+ for (const MEMORY_BASIC_INFORMATION64& mbi : |
+ process_reader_.GetProcessInfo().MemoryInfo()) { |
+ memory_map_.push_back(new internal::MemoryMapRegionSnapshotWin(mbi)); |
+ } |
+ |
INITIALIZATION_STATE_SET_VALID(initialized_); |
return true; |
} |
@@ -187,6 +194,14 @@ const ExceptionSnapshot* ProcessSnapshotWin::Exception() const { |
return exception_.get(); |
} |
+std::vector<const MemoryMapRegionSnapshot*> ProcessSnapshotWin::MemoryMap() |
+ const { |
+ std::vector<const MemoryMapRegionSnapshot*> memory_map; |
+ for (const auto& item : memory_map_) |
+ memory_map.push_back(item); |
+ return memory_map; |
+} |
+ |
std::vector<const MemorySnapshot*> ProcessSnapshotWin::ExtraMemory() const { |
INITIALIZATION_STATE_DCHECK_VALID(initialized_); |
std::vector<const MemorySnapshot*> extra_memory; |