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

Unified Diff: snapshot/win/process_snapshot_win.cc

Issue 1126413008: win: Implement exception snapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes2 Created 5 years, 4 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') | snapshot/win/thread_snapshot_win.cc » ('j') | 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 b25e8caa1079f2267babe3e53543020338af56e2..cb0500ab4ac032ef7f1a730c613c57039d67af5d 100644
--- a/snapshot/win/process_snapshot_win.cc
+++ b/snapshot/win/process_snapshot_win.cc
@@ -14,6 +14,7 @@
#include "snapshot/win/process_snapshot_win.h"
+#include "base/logging.h"
#include "snapshot/win/module_snapshot_win.h"
#include "util/win/time.h"
@@ -24,7 +25,7 @@ ProcessSnapshotWin::ProcessSnapshotWin()
system_(),
threads_(),
modules_(),
- // TODO(scottmg): exception_(),
+ exception_(),
process_reader_(),
report_id_(),
client_id_(),
@@ -53,6 +54,22 @@ bool ProcessSnapshotWin::Initialize(HANDLE process) {
return true;
}
+bool ProcessSnapshotWin::InitializeException(
+ DWORD thread_id,
+ WinVMAddress exception_pointers) {
+ INITIALIZATION_STATE_DCHECK_VALID(initialized_);
+ DCHECK(!exception_);
+
+ exception_.reset(new internal::ExceptionSnapshotWin());
+ if (!exception_->Initialize(
+ &process_reader_, thread_id, exception_pointers)) {
+ exception_.reset();
+ return false;
+ }
+
+ return true;
+}
+
void ProcessSnapshotWin::GetCrashpadOptions(
CrashpadInfoClientOptions* options) {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
@@ -149,8 +166,7 @@ std::vector<const ModuleSnapshot*> ProcessSnapshotWin::Modules() const {
}
const ExceptionSnapshot* ProcessSnapshotWin::Exception() const {
- CHECK(false) << "TODO(scottmg): Exception()";
- return nullptr;
+ return exception_.get();
}
void ProcessSnapshotWin::InitializeThreads() {
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | snapshot/win/thread_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698