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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 private: | 80 private: |
81 CodeViewRecordType codeview_record_; | 81 CodeViewRecordType codeview_record_; |
82 std::string pdb_name_; | 82 std::string pdb_name_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDBLinkWriter); | 84 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDBLinkWriter); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace internal | 87 } // namespace internal |
88 | 88 |
89 //! \brief The writer for a MinidumpModuleCodeViewRecordPDB20 object in a | 89 //! \brief The writer for a CodeViewRecordPDB20 object in a minidump file. |
90 //! minidump file. | |
91 //! | 90 //! |
92 //! Most users will want MinidumpModuleCodeViewRecordPDB70Writer instead. | 91 //! Most users will want MinidumpModuleCodeViewRecordPDB70Writer instead. |
93 class MinidumpModuleCodeViewRecordPDB20Writer final | 92 class MinidumpModuleCodeViewRecordPDB20Writer final |
94 : public internal::MinidumpModuleCodeViewRecordPDBLinkWriter< | 93 : public internal::MinidumpModuleCodeViewRecordPDBLinkWriter< |
95 MinidumpModuleCodeViewRecordPDB20> { | 94 CodeViewRecordPDB20> { |
96 public: | 95 public: |
97 MinidumpModuleCodeViewRecordPDB20Writer() | 96 MinidumpModuleCodeViewRecordPDB20Writer() |
98 : internal::MinidumpModuleCodeViewRecordPDBLinkWriter< | 97 : internal::MinidumpModuleCodeViewRecordPDBLinkWriter< |
99 MinidumpModuleCodeViewRecordPDB20>() {} | 98 CodeViewRecordPDB20>() {} |
100 | 99 |
101 ~MinidumpModuleCodeViewRecordPDB20Writer() override; | 100 ~MinidumpModuleCodeViewRecordPDB20Writer() override; |
102 | 101 |
103 //! \brief Sets MinidumpModuleCodeViewRecordPDB20::timestamp and | 102 //! \brief Sets CodeViewRecordPDB20::timestamp and CodeViewRecordPDB20::age. |
104 //! MinidumpModuleCodeViewRecordPDB20::age. | |
105 void SetTimestampAndAge(time_t timestamp, uint32_t age); | 103 void SetTimestampAndAge(time_t timestamp, uint32_t age); |
106 | 104 |
107 private: | 105 private: |
108 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB20Writer); | 106 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB20Writer); |
109 }; | 107 }; |
110 | 108 |
111 //! \brief The writer for a MinidumpModuleCodeViewRecordPDB70 object in a | 109 //! \brief The writer for a CodeViewRecordPDB70 object in a minidump file. |
112 //! minidump file. | |
113 class MinidumpModuleCodeViewRecordPDB70Writer final | 110 class MinidumpModuleCodeViewRecordPDB70Writer final |
114 : public internal::MinidumpModuleCodeViewRecordPDBLinkWriter< | 111 : public internal::MinidumpModuleCodeViewRecordPDBLinkWriter< |
115 MinidumpModuleCodeViewRecordPDB70> { | 112 CodeViewRecordPDB70> { |
116 public: | 113 public: |
117 MinidumpModuleCodeViewRecordPDB70Writer() | 114 MinidumpModuleCodeViewRecordPDB70Writer() |
118 : internal::MinidumpModuleCodeViewRecordPDBLinkWriter< | 115 : internal::MinidumpModuleCodeViewRecordPDBLinkWriter< |
119 MinidumpModuleCodeViewRecordPDB70>() {} | 116 CodeViewRecordPDB70>() {} |
120 | 117 |
121 ~MinidumpModuleCodeViewRecordPDB70Writer() override; | 118 ~MinidumpModuleCodeViewRecordPDB70Writer() override; |
122 | 119 |
123 //! \brief Initializes the MinidumpModuleCodeViewRecordPDB70 based on \a | 120 //! \brief Initializes the CodeViewRecordPDB70 based on \a module_snapshot. |
124 //! module_snapshot. | |
125 //! | 121 //! |
126 //! \param[in] module_snapshot The module snapshot to use as source data. | 122 //! \param[in] module_snapshot The module snapshot to use as source data. |
127 //! | 123 //! |
128 //! \note Valid in #kStateMutable. No mutator methods may be called before | 124 //! \note Valid in #kStateMutable. No mutator methods may be called before |
129 //! this method, and it is not normally necessary to call any mutator | 125 //! this method, and it is not normally necessary to call any mutator |
130 //! methods after this method. | 126 //! methods after this method. |
131 void InitializeFromSnapshot(const ModuleSnapshot* module_snapshot); | 127 void InitializeFromSnapshot(const ModuleSnapshot* module_snapshot); |
132 | 128 |
133 //! \brief Sets MinidumpModuleCodeViewRecordPDB70::uuid and | 129 //! \brief Sets CodeViewRecordPDB70::uuid and CodeViewRecordPDB70::age. |
134 //! MinidumpModuleCodeViewRecordPDB70::age. | |
135 void SetUUIDAndAge(const UUID& uuid, uint32_t age) { | 130 void SetUUIDAndAge(const UUID& uuid, uint32_t age) { |
136 codeview_record()->uuid = uuid; | 131 codeview_record()->uuid = uuid; |
137 codeview_record()->age = age; | 132 codeview_record()->age = age; |
138 } | 133 } |
139 | 134 |
140 private: | 135 private: |
141 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB70Writer); | 136 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleCodeViewRecordPDB70Writer); |
142 }; | 137 }; |
143 | 138 |
144 //! \brief The writer for an IMAGE_DEBUG_MISC object in a minidump file. | 139 //! \brief The writer for an IMAGE_DEBUG_MISC object in a minidump file. |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 private: | 343 private: |
349 PointerVector<MinidumpModuleWriter> modules_; | 344 PointerVector<MinidumpModuleWriter> modules_; |
350 MINIDUMP_MODULE_LIST module_list_base_; | 345 MINIDUMP_MODULE_LIST module_list_base_; |
351 | 346 |
352 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleListWriter); | 347 DISALLOW_COPY_AND_ASSIGN(MinidumpModuleListWriter); |
353 }; | 348 }; |
354 | 349 |
355 } // namespace crashpad | 350 } // namespace crashpad |
356 | 351 |
357 #endif // CRASHPAD_MINIDUMP_MINIDUMP_MODULE_WRITER_H_ | 352 #endif // CRASHPAD_MINIDUMP_MINIDUMP_MODULE_WRITER_H_ |
OLD | NEW |