Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: snapshot/win/process_snapshot_win.cc

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
Patch Set: fixes Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698