OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |