| 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 16 matching lines...) Expand all Loading... |
| 27 #include "util/mach/mach_extensions.h" | 27 #include "util/mach/mach_extensions.h" |
| 28 #include "util/misc/initialization_state_dcheck.h" | 28 #include "util/misc/initialization_state_dcheck.h" |
| 29 | 29 |
| 30 namespace crashpad { | 30 namespace crashpad { |
| 31 | 31 |
| 32 class ProcessReader; | 32 class ProcessReader; |
| 33 | 33 |
| 34 namespace internal { | 34 namespace internal { |
| 35 | 35 |
| 36 //! \brief An ExceptionSnapshot of an exception sustained by a running (or | 36 //! \brief An ExceptionSnapshot of an exception sustained by a running (or |
| 37 //! crashed) process on a Mac OS X system. | 37 //! crashed) process on a macOS system. |
| 38 class ExceptionSnapshotMac final : public ExceptionSnapshot { | 38 class ExceptionSnapshotMac final : public ExceptionSnapshot { |
| 39 public: | 39 public: |
| 40 ExceptionSnapshotMac(); | 40 ExceptionSnapshotMac(); |
| 41 ~ExceptionSnapshotMac() override; | 41 ~ExceptionSnapshotMac() override; |
| 42 | 42 |
| 43 //! \brief Initializes the object. | 43 //! \brief Initializes the object. |
| 44 //! | 44 //! |
| 45 //! Other than \a process_reader, the parameters may be passed directly | 45 //! Other than \a process_reader, the parameters may be passed directly |
| 46 //! through from a Mach exception handler. | 46 //! through from a Mach exception handler. |
| 47 //! | 47 //! |
| 48 //! \param[in] process_reader A ProcessReader for the task that sustained the | 48 //! \param[in] process_reader A ProcessReader for the task that sustained the |
| 49 //! exception. | 49 //! exception. |
| 50 //! \param[in] behavior |
| 51 //! \param[in] exception_thread |
| 52 //! \param[in] exception |
| 53 //! \param[in] code |
| 54 //! \param[in] code_count |
| 55 //! \param[in,out] flavor |
| 56 //! \param[in] state |
| 57 //! \param[in] state_count |
| 50 //! | 58 //! |
| 51 //! \return `true` if the snapshot could be created, `false` otherwise with | 59 //! \return `true` if the snapshot could be created, `false` otherwise with |
| 52 //! an appropriate message logged. | 60 //! an appropriate message logged. |
| 53 bool Initialize(ProcessReader* process_reader, | 61 bool Initialize(ProcessReader* process_reader, |
| 54 exception_behavior_t behavior, | 62 exception_behavior_t behavior, |
| 55 thread_t exception_thread, | 63 thread_t exception_thread, |
| 56 exception_type_t exception, | 64 exception_type_t exception, |
| 57 const mach_exception_data_type_t* code, | 65 const mach_exception_data_type_t* code, |
| 58 mach_msg_type_number_t code_count, | 66 mach_msg_type_number_t code_count, |
| 59 thread_state_flavor_t flavor, | 67 thread_state_flavor_t flavor, |
| (...skipping 25 matching lines...) Expand all Loading... |
| 85 uint32_t exception_code_0_; | 93 uint32_t exception_code_0_; |
| 86 InitializationStateDcheck initialized_; | 94 InitializationStateDcheck initialized_; |
| 87 | 95 |
| 88 DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotMac); | 96 DISALLOW_COPY_AND_ASSIGN(ExceptionSnapshotMac); |
| 89 }; | 97 }; |
| 90 | 98 |
| 91 } // namespace internal | 99 } // namespace internal |
| 92 } // namespace crashpad | 100 } // namespace crashpad |
| 93 | 101 |
| 94 #endif // CRASHPAD_SNAPSHOT_MAC_EXCEPTION_SNAPSHOT_MAC_H_ | 102 #endif // CRASHPAD_SNAPSHOT_MAC_EXCEPTION_SNAPSHOT_MAC_H_ |
| OLD | NEW |