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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 ~ExceptionPorts(); | 106 ~ExceptionPorts(); |
107 | 107 |
108 //! \brief Calls `*_get_exception_ports()` on the target. | 108 //! \brief Calls `*_get_exception_ports()` on the target. |
109 //! | 109 //! |
110 //! \param[in] mask The exception mask, containing the `EXC_MASK_*` values to | 110 //! \param[in] mask The exception mask, containing the `EXC_MASK_*` values to |
111 //! be looked up and returned in \a handlers. | 111 //! be looked up and returned in \a handlers. |
112 //! \param[out] handlers The exception handlers registered for \a target_port | 112 //! \param[out] handlers The exception handlers registered for \a target_port |
113 //! to handle exceptions indicated in \a mask. The caller must take | 113 //! to handle exceptions indicated in \a mask. The caller must take |
114 //! ownership of the \a port members of the returned ExceptionHandler | 114 //! ownership of the \a port members of the returned ExceptionHandler |
115 //! objects. On failure, this argument is untouched. | 115 //! objects. If no execption port is registered for a bit in \a mask, \a |
| 116 //! handlers will not contain an entry corresponding to that bit. This is |
| 117 //! a departure from the `*_get_exception_ports()` functions, which may |
| 118 //! return a handler whose port is set to `EXCEPTION_PORT_NULL` in this |
| 119 //! case. On failure, this argument is untouched. |
116 //! | 120 //! |
117 //! \return `true` if `*_get_exception_ports()` returned `KERN_SUCCESS`, with | 121 //! \return `true` if `*_get_exception_ports()` returned `KERN_SUCCESS`, with |
118 //! \a handlers set appropriately. `false` otherwise, with an appropriate | 122 //! \a handlers set appropriately. `false` otherwise, with an appropriate |
119 //! message logged. | 123 //! message logged. |
120 bool GetExceptionPorts(exception_mask_t mask, | 124 bool GetExceptionPorts(exception_mask_t mask, |
121 std::vector<ExceptionHandler>* handlers) const; | 125 std::vector<ExceptionHandler>* handlers) const; |
122 | 126 |
123 //! \brief Calls `*_set_exception_ports()` on the target. | 127 //! \brief Calls `*_set_exception_ports()` on the target. |
124 //! | 128 //! |
125 //! \param[in] mask A mask specifying the exception types to direct to \a | 129 //! \param[in] mask A mask specifying the exception types to direct to \a |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 // even with a MACH_PORT_NULL target_port, because it is incorrect to | 177 // even with a MACH_PORT_NULL target_port, because it is incorrect to |
174 // deallocate the result of mach_task_self(). | 178 // deallocate the result of mach_task_self(). |
175 bool dealloc_target_port_; | 179 bool dealloc_target_port_; |
176 | 180 |
177 DISALLOW_COPY_AND_ASSIGN(ExceptionPorts); | 181 DISALLOW_COPY_AND_ASSIGN(ExceptionPorts); |
178 }; | 182 }; |
179 | 183 |
180 } // namespace crashpad | 184 } // namespace crashpad |
181 | 185 |
182 #endif // CRASHPAD_UTIL_MACH_EXCEPTION_PORTS_H_ | 186 #endif // CRASHPAD_UTIL_MACH_EXCEPTION_PORTS_H_ |
OLD | NEW |