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 19 matching lines...) Expand all Loading... |
30 #include "snapshot/mac/crashpad_info_client_options.h" | 30 #include "snapshot/mac/crashpad_info_client_options.h" |
31 #include "snapshot/mac/exception_snapshot_mac.h" | 31 #include "snapshot/mac/exception_snapshot_mac.h" |
32 #include "snapshot/mac/module_snapshot_mac.h" | 32 #include "snapshot/mac/module_snapshot_mac.h" |
33 #include "snapshot/mac/process_reader.h" | 33 #include "snapshot/mac/process_reader.h" |
34 #include "snapshot/mac/system_snapshot_mac.h" | 34 #include "snapshot/mac/system_snapshot_mac.h" |
35 #include "snapshot/mac/thread_snapshot_mac.h" | 35 #include "snapshot/mac/thread_snapshot_mac.h" |
36 #include "snapshot/module_snapshot.h" | 36 #include "snapshot/module_snapshot.h" |
37 #include "snapshot/process_snapshot.h" | 37 #include "snapshot/process_snapshot.h" |
38 #include "snapshot/system_snapshot.h" | 38 #include "snapshot/system_snapshot.h" |
39 #include "snapshot/thread_snapshot.h" | 39 #include "snapshot/thread_snapshot.h" |
| 40 #include "util/mach/mach_extensions.h" |
40 #include "util/misc/initialization_state_dcheck.h" | 41 #include "util/misc/initialization_state_dcheck.h" |
41 #include "util/misc/uuid.h" | 42 #include "util/misc/uuid.h" |
42 #include "util/stdlib/pointer_container.h" | 43 #include "util/stdlib/pointer_container.h" |
43 | 44 |
44 namespace crashpad { | 45 namespace crashpad { |
45 | 46 |
46 //! \brief A ProcessSnapshot of a running (or crashed) process running on a Mac | 47 //! \brief A ProcessSnapshot of a running (or crashed) process running on a Mac |
47 //! OS X system. | 48 //! OS X system. |
48 class ProcessSnapshotMac final : public ProcessSnapshot { | 49 class ProcessSnapshotMac final : public ProcessSnapshot { |
49 public: | 50 public: |
(...skipping 17 matching lines...) Expand all Loading... |
67 //! Initialize(). | 68 //! Initialize(). |
68 //! | 69 //! |
69 //! \return `true` if the exception information could be initialized, `false` | 70 //! \return `true` if the exception information could be initialized, `false` |
70 //! otherwise with an appropriate message logged. When this method returns | 71 //! otherwise with an appropriate message logged. When this method returns |
71 //! `false`, the ProcessSnapshotMac object’s validity remains unchanged. | 72 //! `false`, the ProcessSnapshotMac object’s validity remains unchanged. |
72 bool InitializeException(thread_t exception_thread, | 73 bool InitializeException(thread_t exception_thread, |
73 exception_type_t exception, | 74 exception_type_t exception, |
74 const mach_exception_data_type_t* code, | 75 const mach_exception_data_type_t* code, |
75 mach_msg_type_number_t code_count, | 76 mach_msg_type_number_t code_count, |
76 thread_state_flavor_t flavor, | 77 thread_state_flavor_t flavor, |
77 const natural_t* state, | 78 ConstThreadState state, |
78 mach_msg_type_number_t state_count); | 79 mach_msg_type_number_t state_count); |
79 | 80 |
80 //! \brief Sets the value to be returned by ReportID(). | 81 //! \brief Sets the value to be returned by ReportID(). |
81 //! | 82 //! |
82 //! On Mac OS X, the crash report ID is under the control of the snapshot | 83 //! On Mac OS X, the crash report ID is under the control of the snapshot |
83 //! producer, which may call this method to set the report ID. If this is not | 84 //! producer, which may call this method to set the report ID. If this is not |
84 //! done, ReportID() will return an identifier consisting entirely of zeroes. | 85 //! done, ReportID() will return an identifier consisting entirely of zeroes. |
85 void SetReportID(const UUID& report_id) { report_id_ = report_id; } | 86 void SetReportID(const UUID& report_id) { report_id_ = report_id; } |
86 | 87 |
87 //! \brief Sets the value to be returned by ClientID(). | 88 //! \brief Sets the value to be returned by ClientID(). |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 std::map<std::string, std::string> annotations_simple_map_; | 143 std::map<std::string, std::string> annotations_simple_map_; |
143 timeval snapshot_time_; | 144 timeval snapshot_time_; |
144 InitializationStateDcheck initialized_; | 145 InitializationStateDcheck initialized_; |
145 | 146 |
146 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); | 147 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotMac); |
147 }; | 148 }; |
148 | 149 |
149 } // namespace crashpad | 150 } // namespace crashpad |
150 | 151 |
151 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ | 152 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_SNAPSHOT_MAC_H_ |
OLD | NEW |