| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 //! until UseHandler() is called. | 80 //! until UseHandler() is called. |
| 81 //! | 81 //! |
| 82 //! The IPC port name (somehow) encodes enough information so that | 82 //! The IPC port name (somehow) encodes enough information so that |
| 83 //! registration is done with a crash handler using the appropriate database | 83 //! registration is done with a crash handler using the appropriate database |
| 84 //! and upload server. | 84 //! and upload server. |
| 85 //! | 85 //! |
| 86 //! \param[in] ipc_port The full name of the crash handler IPC port. | 86 //! \param[in] ipc_port The full name of the crash handler IPC port. |
| 87 //! | 87 //! |
| 88 //! \return `true` on success and `false` on failure. | 88 //! \return `true` on success and `false` on failure. |
| 89 bool SetHandler(const std::string& ipc_port); | 89 bool SetHandler(const std::string& ipc_port); |
| 90 |
| 91 //! \brief Requests that the handler capture a dump even though there hasn't |
| 92 //! been a crash. This function should not be called from multiple threads |
| 93 //! simultaneously. |
| 94 //! |
| 95 //! \return `true` on success, `false` on failure with a message logged. |
| 96 static bool DumpWithoutCrash(); |
| 90 #endif | 97 #endif |
| 91 | 98 |
| 92 //! \brief Configures the process to direct its crashes to a Crashpad handler. | 99 //! \brief Configures the process to direct its crashes to a Crashpad handler. |
| 93 //! | 100 //! |
| 94 //! The Crashpad handler must previously have been started by StartHandler() | 101 //! The Crashpad handler must previously have been started by StartHandler() |
| 95 //! or configured by SetHandler(). | 102 //! or configured by SetHandler(). |
| 96 //! | 103 //! |
| 97 //! On Mac OS X, this method sets the task’s exception port for `EXC_CRASH`, | 104 //! On Mac OS X, this method sets the task’s exception port for `EXC_CRASH`, |
| 98 //! `EXC_RESOURCE`, and `EXC_GUARD` exceptions to the Mach send right obtained | 105 //! `EXC_RESOURCE`, and `EXC_GUARD` exceptions to the Mach send right obtained |
| 99 //! by StartHandler(). The handler will be installed with behavior | 106 //! by StartHandler(). The handler will be installed with behavior |
| (...skipping 17 matching lines...) Expand all Loading... |
| 117 #if defined(OS_MACOSX) | 124 #if defined(OS_MACOSX) |
| 118 base::mac::ScopedMachSendRight exception_port_; | 125 base::mac::ScopedMachSendRight exception_port_; |
| 119 #endif | 126 #endif |
| 120 | 127 |
| 121 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); | 128 DISALLOW_COPY_AND_ASSIGN(CrashpadClient); |
| 122 }; | 129 }; |
| 123 | 130 |
| 124 } // namespace crashpad | 131 } // namespace crashpad |
| 125 | 132 |
| 126 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ | 133 #endif // CRASHPAD_CLIENT_CRASHPAD_CLIENT_H_ |
| OLD | NEW |