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

Side by Side Diff: handler/win/crash_report_exception_handler.cc

Issue 1392093003: win: Capture some CRITICAL_SECTION debugging data (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . 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 unified diff | Download patch
« no previous file with comments | « handler/win/crash_report_exception_handler.h ('k') | handler/win/crashy_test_program.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 CrashReportExceptionHandler::~CrashReportExceptionHandler() { 37 CrashReportExceptionHandler::~CrashReportExceptionHandler() {
38 } 38 }
39 39
40 void CrashReportExceptionHandler::ExceptionHandlerServerStarted() { 40 void CrashReportExceptionHandler::ExceptionHandlerServerStarted() {
41 } 41 }
42 42
43 unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException( 43 unsigned int CrashReportExceptionHandler::ExceptionHandlerServerException(
44 HANDLE process, 44 HANDLE process,
45 WinVMAddress exception_information_address) { 45 WinVMAddress exception_information_address,
46 WinVMAddress debug_critical_section_address) {
46 const unsigned int kFailedTerminationCode = 0xffff7002; 47 const unsigned int kFailedTerminationCode = 0xffff7002;
47 48
48 ScopedProcessSuspend suspend(process); 49 ScopedProcessSuspend suspend(process);
49 50
50 ProcessSnapshotWin process_snapshot; 51 ProcessSnapshotWin process_snapshot;
51 if (!process_snapshot.Initialize(process, 52 if (!process_snapshot.Initialize(process,
52 ProcessSuspensionState::kSuspended)) { 53 ProcessSuspensionState::kSuspended,
54 debug_critical_section_address)) {
53 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed"; 55 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed";
54 return kFailedTerminationCode; 56 return kFailedTerminationCode;
55 } 57 }
56 58
57 if (!process_snapshot.InitializeException(exception_information_address)) { 59 if (!process_snapshot.InitializeException(exception_information_address)) {
58 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed"; 60 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed";
59 return kFailedTerminationCode; 61 return kFailedTerminationCode;
60 } 62 }
61 63
62 // Now that we have the exception information, even if something else fails we 64 // Now that we have the exception information, even if something else fails we
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return termination_code; 112 return termination_code;
111 } 113 }
112 114
113 upload_thread_->ReportPending(); 115 upload_thread_->ReportPending();
114 } 116 }
115 117
116 return termination_code; 118 return termination_code;
117 } 119 }
118 120
119 } // namespace crashpad 121 } // namespace crashpad
OLDNEW
« no previous file with comments | « handler/win/crash_report_exception_handler.h ('k') | handler/win/crashy_test_program.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698