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

Unified Diff: snapshot/win/process_snapshot_win.cc

Issue 1364053002: win: Save contents of PEB to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-teb
Patch Set: fixes Created 5 years, 3 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
Index: snapshot/win/process_snapshot_win.cc
diff --git a/snapshot/win/process_snapshot_win.cc b/snapshot/win/process_snapshot_win.cc
index d468c6cec7594430460c5b9bb1d59ea045ec4ac9..b9df62c0ab4c011109ab9054f5b556141958d658 100644
--- a/snapshot/win/process_snapshot_win.cc
+++ b/snapshot/win/process_snapshot_win.cc
@@ -48,6 +48,10 @@ bool ProcessSnapshotWin::Initialize(HANDLE process,
return false;
system_.Initialize(&process_reader_);
+ WinVMAddress peb_address;
+ WinVMSize peb_size;
+ process_reader_.GetProcessInfo().Peb(&peb_address, &peb_size);
+ peb_.Initialize(&process_reader_, peb_address, peb_size);
InitializeThreads();
InitializeModules();
@@ -112,12 +116,12 @@ void ProcessSnapshotWin::GetCrashpadOptions(
pid_t ProcessSnapshotWin::ProcessID() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
- return process_reader_.ProcessID();
+ return process_reader_.GetProcessInfo().ProcessID();
}
pid_t ProcessSnapshotWin::ParentProcessID() const {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
- return process_reader_.ParentProcessID();
+ return process_reader_.GetProcessInfo().ParentProcessID();
}
void ProcessSnapshotWin::SnapshotTime(timeval* snapshot_time) const {
@@ -179,6 +183,13 @@ const ExceptionSnapshot* ProcessSnapshotWin::Exception() const {
return exception_.get();
}
+std::vector<const MemorySnapshot*> ProcessSnapshotWin::ExtraMemory() const {
+ INITIALIZATION_STATE_DCHECK_VALID(initialized_);
+ std::vector<const MemorySnapshot*> extra_memory;
+ extra_memory.push_back(&peb_);
+ return extra_memory;
+}
+
void ProcessSnapshotWin::InitializeThreads() {
const std::vector<ProcessReaderWin::Thread>& process_reader_threads =
process_reader_.Threads();

Powered by Google App Engine
This is Rietveld 408576698