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_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ |
16 #define CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ | 16 #define CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ |
17 | 17 |
18 #include <stdint.h> | 18 #include <stdint.h> |
19 #include <sys/types.h> | 19 #include <sys/types.h> |
20 | 20 |
21 #include <map> | 21 #include <map> |
22 #include <string> | 22 #include <string> |
23 #include <vector> | 23 #include <vector> |
24 | 24 |
25 #include "base/basictypes.h" | 25 #include "base/basictypes.h" |
| 26 #include "client/crashpad_info.h" |
| 27 #include "snapshot/mac/crashpad_info_client_options.h" |
26 #include "snapshot/mac/process_reader.h" | 28 #include "snapshot/mac/process_reader.h" |
27 #include "snapshot/module_snapshot.h" | 29 #include "snapshot/module_snapshot.h" |
28 #include "util/misc/initialization_state_dcheck.h" | 30 #include "util/misc/initialization_state_dcheck.h" |
29 | 31 |
30 namespace crashpad { | 32 namespace crashpad { |
31 | 33 |
32 class MachOImageReader; | 34 class MachOImageReader; |
33 struct UUID; | 35 struct UUID; |
34 | 36 |
35 namespace internal { | 37 namespace internal { |
(...skipping 10 matching lines...) Expand all Loading... |
46 //! \param[in] process_reader A ProcessReader for the task containing the | 48 //! \param[in] process_reader A ProcessReader for the task containing the |
47 //! module. | 49 //! module. |
48 //! \param[in] process_reader_module The module within the ProcessReader for | 50 //! \param[in] process_reader_module The module within the ProcessReader for |
49 //! which the snapshot should be created. | 51 //! which the snapshot should be created. |
50 //! | 52 //! |
51 //! \return `true` if the snapshot could be created, `false` otherwise with | 53 //! \return `true` if the snapshot could be created, `false` otherwise with |
52 //! an appropriate message logged. | 54 //! an appropriate message logged. |
53 bool Initialize(ProcessReader* process_reader, | 55 bool Initialize(ProcessReader* process_reader, |
54 const ProcessReader::Module& process_reader_module); | 56 const ProcessReader::Module& process_reader_module); |
55 | 57 |
| 58 //! \brief Returns options from the module’s CrashpadInfo structure. |
| 59 //! |
| 60 //! \param[out] options Options set in the module’s CrashpadInfo structure. |
| 61 void GetCrashpadOptions(CrashpadInfoClientOptions* options); |
| 62 |
56 // ModuleSnapshot: | 63 // ModuleSnapshot: |
57 | 64 |
58 std::string Name() const override; | 65 std::string Name() const override; |
59 uint64_t Address() const override; | 66 uint64_t Address() const override; |
60 uint64_t Size() const override; | 67 uint64_t Size() const override; |
61 time_t Timestamp() const override; | 68 time_t Timestamp() const override; |
62 void FileVersion(uint16_t* version_0, | 69 void FileVersion(uint16_t* version_0, |
63 uint16_t* version_1, | 70 uint16_t* version_1, |
64 uint16_t* version_2, | 71 uint16_t* version_2, |
65 uint16_t* version_3) const override; | 72 uint16_t* version_3) const override; |
(...skipping 13 matching lines...) Expand all Loading... |
79 ProcessReader* process_reader_; // weak | 86 ProcessReader* process_reader_; // weak |
80 InitializationStateDcheck initialized_; | 87 InitializationStateDcheck initialized_; |
81 | 88 |
82 DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotMac); | 89 DISALLOW_COPY_AND_ASSIGN(ModuleSnapshotMac); |
83 }; | 90 }; |
84 | 91 |
85 } // namespace internal | 92 } // namespace internal |
86 } // namespace crashpad | 93 } // namespace crashpad |
87 | 94 |
88 #endif // CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ | 95 #endif // CRASHPAD_SNAPSHOT_MAC_MODULE_SNAPSHOT_MAC_H_ |
OLD | NEW |