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 30 matching lines...) Expand all Loading... |
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 const unsigned int kFailedTerminationCode = 0xffff7002; | 46 const unsigned int kFailedTerminationCode = 0xffff7002; |
47 | 47 |
48 ScopedProcessSuspend suspend(process); | 48 ScopedProcessSuspend suspend(process); |
49 | 49 |
50 ProcessSnapshotWin process_snapshot; | 50 ProcessSnapshotWin process_snapshot; |
51 if (!process_snapshot.Initialize(process)) { | 51 if (!process_snapshot.Initialize(process, |
| 52 ProcessSuspensionState::kSuspended)) { |
52 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed"; | 53 LOG(WARNING) << "ProcessSnapshotWin::Initialize failed"; |
53 return kFailedTerminationCode; | 54 return kFailedTerminationCode; |
54 } | 55 } |
55 | 56 |
56 if (!process_snapshot.InitializeException(exception_information_address)) { | 57 if (!process_snapshot.InitializeException(exception_information_address)) { |
57 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed"; | 58 LOG(WARNING) << "ProcessSnapshotWin::InitializeException failed"; |
58 return kFailedTerminationCode; | 59 return kFailedTerminationCode; |
59 } | 60 } |
60 | 61 |
61 // Now that we have the exception information, even if something else fails we | 62 // 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... |
109 return termination_code; | 110 return termination_code; |
110 } | 111 } |
111 | 112 |
112 upload_thread_->ReportPending(); | 113 upload_thread_->ReportPending(); |
113 } | 114 } |
114 | 115 |
115 return termination_code; | 116 return termination_code; |
116 } | 117 } |
117 | 118 |
118 } // namespace crashpad | 119 } // namespace crashpad |
OLD | NEW |