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

Unified Diff: snapshot/win/process_snapshot_win.cc

Issue 1314093002: Refactor handler/main for Windows, implement CrashHandlerExceptionServer (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@crash-handler-exe
Patch Set: fixes2 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
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | util/win/exception_handler_server.h » ('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 cb0500ab4ac032ef7f1a730c613c57039d67af5d..cb0c0d3abf979804cdc99a582ca7974f8171e4ac 100644
--- a/snapshot/win/process_snapshot_win.cc
+++ b/snapshot/win/process_snapshot_win.cc
@@ -16,6 +16,7 @@
#include "base/logging.h"
#include "snapshot/win/module_snapshot_win.h"
+#include "util/win/registration_protocol_win.h"
#include "util/win/time.h"
namespace crashpad {
@@ -55,14 +56,22 @@ bool ProcessSnapshotWin::Initialize(HANDLE process) {
}
bool ProcessSnapshotWin::InitializeException(
- DWORD thread_id,
- WinVMAddress exception_pointers) {
+ WinVMAddress exception_information_address) {
INITIALIZATION_STATE_DCHECK_VALID(initialized_);
DCHECK(!exception_);
+ ExceptionInformation exception_information;
+ if (!process_reader_.ReadMemory(exception_information_address,
+ sizeof(exception_information),
+ &exception_information)) {
+ LOG(WARNING) << "ReadMemory ExceptionInformation failed";
+ return false;
+ }
+
exception_.reset(new internal::ExceptionSnapshotWin());
- if (!exception_->Initialize(
- &process_reader_, thread_id, exception_pointers)) {
+ if (!exception_->Initialize(&process_reader_,
+ exception_information.thread_id,
+ exception_information.exception_pointers)) {
exception_.reset();
return false;
}
« no previous file with comments | « snapshot/win/process_snapshot_win.h ('k') | util/win/exception_handler_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698