| 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, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #ifndef CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ | 15 #ifndef CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ |
| 16 #define CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ | 16 #define CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ |
| 17 | 17 |
| 18 #include <mach/mach.h> | 18 #include <mach/mach.h> |
| 19 | 19 |
| 20 #include <set> | 20 #include <set> |
| 21 | 21 |
| 22 #include "base/basictypes.h" | 22 #include "base/basictypes.h" |
| 23 #include "base/memory/scoped_ptr.h" | 23 #include "base/memory/scoped_ptr.h" |
| 24 #include "util/mach/mach_extensions.h" |
| 24 #include "util/mach/mach_message_server.h" | 25 #include "util/mach/mach_message_server.h" |
| 25 | 26 |
| 26 namespace crashpad { | 27 namespace crashpad { |
| 27 | 28 |
| 28 namespace internal { | 29 namespace internal { |
| 29 class UniversalMachExcServerImpl; | 30 class UniversalMachExcServerImpl; |
| 30 } // namespace internal | 31 } // namespace internal |
| 31 | 32 |
| 32 //! \brief A server interface for the `exc` and `mach_exc` Mach subsystems, | 33 //! \brief A server interface for the `exc` and `mach_exc` Mach subsystems, |
| 33 //! unified to handle exceptions delivered to either subsystem, and | 34 //! unified to handle exceptions delivered to either subsystem, and |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 //! MachMessageServer::Interface. | 77 //! MachMessageServer::Interface. |
| 77 virtual kern_return_t CatchMachException( | 78 virtual kern_return_t CatchMachException( |
| 78 exception_behavior_t behavior, | 79 exception_behavior_t behavior, |
| 79 exception_handler_t exception_port, | 80 exception_handler_t exception_port, |
| 80 thread_t thread, | 81 thread_t thread, |
| 81 task_t task, | 82 task_t task, |
| 82 exception_type_t exception, | 83 exception_type_t exception, |
| 83 const mach_exception_data_type_t* code, | 84 const mach_exception_data_type_t* code, |
| 84 mach_msg_type_number_t code_count, | 85 mach_msg_type_number_t code_count, |
| 85 thread_state_flavor_t* flavor, | 86 thread_state_flavor_t* flavor, |
| 86 const natural_t* old_state, | 87 ConstThreadState old_state, |
| 87 mach_msg_type_number_t old_state_count, | 88 mach_msg_type_number_t old_state_count, |
| 88 thread_state_t new_state, | 89 thread_state_t new_state, |
| 89 mach_msg_type_number_t* new_state_count, | 90 mach_msg_type_number_t* new_state_count, |
| 90 const mach_msg_trailer_t* trailer, | 91 const mach_msg_trailer_t* trailer, |
| 91 bool* destroy_complex_request) = 0; | 92 bool* destroy_complex_request) = 0; |
| 92 | 93 |
| 93 protected: | 94 protected: |
| 94 ~Interface() {} | 95 ~Interface() {} |
| 95 }; | 96 }; |
| 96 | 97 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 //! This parameter is untouched if \a behavior is not state-carrying. | 225 //! This parameter is untouched if \a behavior is not state-carrying. |
| 225 //! \param[inout] new_state_count On entry, the number of `natural_t` words | 226 //! \param[inout] new_state_count On entry, the number of `natural_t` words |
| 226 //! available to be written to in \a new_state. On return, the number of | 227 //! available to be written to in \a new_state. On return, the number of |
| 227 //! significant `natural_t` words in \a new_state. This may be taken | 228 //! significant `natural_t` words in \a new_state. This may be taken |
| 228 //! directly from the \a new_state_count parameter of | 229 //! directly from the \a new_state_count parameter of |
| 229 //! internal::SimplifiedExcServer::Interface::CatchException(), for example. | 230 //! internal::SimplifiedExcServer::Interface::CatchException(), for example. |
| 230 //! This parameter is untouched if \a behavior is not state-carrying. If \a | 231 //! This parameter is untouched if \a behavior is not state-carrying. If \a |
| 231 //! \a behavior is state-carrying, this parameter should be at least as | 232 //! \a behavior is state-carrying, this parameter should be at least as |
| 232 //! large as \a old_state_count. | 233 //! large as \a old_state_count. |
| 233 void ExcServerCopyState(exception_behavior_t behavior, | 234 void ExcServerCopyState(exception_behavior_t behavior, |
| 234 const natural_t* old_state, | 235 ConstThreadState old_state, |
| 235 mach_msg_type_number_t old_state_count, | 236 mach_msg_type_number_t old_state_count, |
| 236 thread_state_t new_state, | 237 thread_state_t new_state, |
| 237 mach_msg_type_number_t* new_state_count); | 238 mach_msg_type_number_t* new_state_count); |
| 238 | 239 |
| 239 } // namespace crashpad | 240 } // namespace crashpad |
| 240 | 241 |
| 241 #endif // CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ | 242 #endif // CRASHPAD_UTIL_MACH_EXC_SERVER_VARIANTS_H_ |
| OLD | NEW |