| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 //! \return The full name of the crash handler IPC pipe, a string of the form | 135 //! \return The full name of the crash handler IPC pipe, a string of the form |
| 136 //! `"\\.\pipe\NAME"`. | 136 //! `"\\.\pipe\NAME"`. |
| 137 std::wstring GetHandlerIPCPipe() const; | 137 std::wstring GetHandlerIPCPipe() const; |
| 138 | 138 |
| 139 //! \brief Requests that the handler capture a dump even though there hasn't | 139 //! \brief Requests that the handler capture a dump even though there hasn't |
| 140 //! been a crash. | 140 //! been a crash. |
| 141 //! | 141 //! |
| 142 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or | 142 //! \param[in] context A `CONTEXT`, generally captured by CaptureContext() or |
| 143 //! similar. | 143 //! similar. |
| 144 static void DumpWithoutCrash(const CONTEXT& context); | 144 static void DumpWithoutCrash(const CONTEXT& context); |
| 145 |
| 146 //! \brief Requests that the handler capture a dump using the given \a |
| 147 //! exception_pointers to get the `EXCEPTION_RECORD` and `CONTEXT`. |
| 148 //! |
| 149 //! This function is not necessary in general usage as an unhandled exception |
| 150 //! filter is installed by UseHandler(). |
| 151 //! |
| 152 //! \param[in] exception_pointers An `EXCEPTION_POINTERS`, as would generally |
| 153 //! passed to an unhandled exception filter. |
| 154 static void DumpAndCrash(EXCEPTION_POINTERS* exception_pointers); |
| 145 #endif | 155 #endif |
| 146 | 156 |
| 147 //! \brief Configures the process to direct its crashes to a Crashpad handler. | 157 //! \brief Configures the process to direct its crashes to a Crashpad handler. |
| 148 //! | 158 //! |
| 149 //! The Crashpad handler must previously have been started by StartHandler() | 159 //! The Crashpad handler must previously have been started by StartHandler() |
| 150 //! or configured by SetHandlerMachService(), SetHandlerMachPort(), or | 160 //! or configured by SetHandlerMachService(), SetHandlerMachPort(), or |
| 151 //! SetHandlerIPCPipe(). | 161 //! SetHandlerIPCPipe(). |
| 152 //! | 162 //! |
| 153 //! On Mac OS X, this method sets the task’s exception port for `EXC_CRASH`, | 163 //! On Mac OS X, this method sets the task’s exception port for `EXC_CRASH`, |
| 154 //! `EXC_RESOURCE`, and `EXC_GUARD` exceptions to the Mach send right obtained | 164 //! `EXC_RESOURCE`, and `EXC_GUARD` exceptions to the Mach send right obtained |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 #elif defined(OS_WIN) | 206 #elif defined(OS_WIN) |
| 197 std::wstring ipc_pipe_; | 207 std::wstring ipc_pipe_; |
| 198 #endif | 208 #endif |
| 199 | 209 |
| 200 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); | 210 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); |
| 201 }; | 211 }; |
| 202 | 212 |
| 203 } // namespace crashpad | 213 } // namespace crashpad |
| 204 | 214 |
| 205 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ | 215 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ |
| OLD | NEW |