Index: snapshot/win/exception_snapshot_win.cc |
diff --git a/snapshot/win/exception_snapshot_win.cc b/snapshot/win/exception_snapshot_win.cc |
index 731669ad49cd41c58a5d26ae2abdb1cfb6c9b252..d7fb4c3cc2e881398e58570e679d875092a002de 100644 |
--- a/snapshot/win/exception_snapshot_win.cc |
+++ b/snapshot/win/exception_snapshot_win.cc |
@@ -134,11 +134,20 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers( |
LOG(ERROR) << "EXCEPTION_POINTERS read failed"; |
return false; |
} |
- if (!exception_pointers.ExceptionRecord) { |
- LOG(ERROR) << "null ExceptionRecord"; |
+ |
+ if (!process_reader.ReadMemory( |
+ static_cast<WinVMAddress>(exception_pointers.ContextRecord), |
+ sizeof(*context_record), |
+ context_record)) { |
+ LOG(ERROR) << "ContextRecord"; |
return false; |
} |
+ if (!exception_pointers.ExceptionRecord) { |
+ LOG(INFO) << "null ExceptionRecord, not capturing any exception"; |
Mark Mentovai
2015/09/23 20:00:52
This is fully expected now, I don’t think we need
scottmg
2015/09/24 19:16:52
Done.
|
+ return true; |
+ } |
+ |
ExceptionRecordType first_record; |
if (!process_reader.ReadMemory( |
static_cast<WinVMAddress>(exception_pointers.ExceptionRecord), |
@@ -157,14 +166,6 @@ bool ExceptionSnapshotWin::InitializeFromExceptionPointers( |
LOG(WARNING) << "dropping chained ExceptionRecord"; |
} |
- if (!process_reader.ReadMemory( |
- static_cast<WinVMAddress>(exception_pointers.ContextRecord), |
- sizeof(*context_record), |
- context_record)) { |
- LOG(ERROR) << "ContextRecord"; |
- return false; |
- } |
- |
return true; |
} |