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_PROCESS_SNAPSHOT_H_ | 15 #ifndef CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
16 #define CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ | 16 #define CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
17 | 17 |
18 #include <sys/time.h> | 18 #include <sys/time.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 "util/misc/uuid.h" | 25 #include "util/misc/uuid.h" |
26 | 26 |
27 namespace crashpad { | 27 namespace crashpad { |
28 | 28 |
29 class ExceptionSnapshot; | 29 class ExceptionSnapshot; |
30 class MemorySnapshot; | |
30 class ModuleSnapshot; | 31 class ModuleSnapshot; |
31 class SystemSnapshot; | 32 class SystemSnapshot; |
32 class ThreadSnapshot; | 33 class ThreadSnapshot; |
33 | 34 |
34 //! \brief An abstract interface to a snapshot representing the state of a | 35 //! \brief An abstract interface to a snapshot representing the state of a |
35 //! process. | 36 //! process. |
36 //! | 37 //! |
37 //! This is the top-level object in a family of Snapshot objects, because it | 38 //! This is the top-level object in a family of Snapshot objects, because it |
38 //! gives access to a SystemSnapshot, vectors of ModuleSnapshot and | 39 //! gives access to a SystemSnapshot, vectors of ModuleSnapshot and |
39 //! ThreadSnapshot objects, and possibly an ExceptionSnapshot. In turn, | 40 //! ThreadSnapshot objects, and possibly an ExceptionSnapshot. In turn, |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 virtual std::vector<const ThreadSnapshot*> Threads() const = 0; | 154 virtual std::vector<const ThreadSnapshot*> Threads() const = 0; |
154 | 155 |
155 //! \brief Returns an ExceptionSnapshot reflecting the exception that the | 156 //! \brief Returns an ExceptionSnapshot reflecting the exception that the |
156 //! snapshot process sustained to trigger the snapshot being taken. | 157 //! snapshot process sustained to trigger the snapshot being taken. |
157 //! | 158 //! |
158 //! \return An ExceptionSnapshot object. The caller does not take ownership of | 159 //! \return An ExceptionSnapshot object. The caller does not take ownership of |
159 //! this object, it is scoped to the lifetime of the ProcessSnapshot | 160 //! this object, it is scoped to the lifetime of the ProcessSnapshot |
160 //! object that it was obtained from. If the snapshot is not a result of | 161 //! object that it was obtained from. If the snapshot is not a result of |
161 //! an exception, returns `nullptr`. | 162 //! an exception, returns `nullptr`. |
162 virtual const ExceptionSnapshot* Exception() const = 0; | 163 virtual const ExceptionSnapshot* Exception() const = 0; |
164 | |
165 //! \brief Returns a vector of additional memory blocks that should be | |
166 //! included in a minidump. | |
167 //! | |
168 //! \return An std::vector<const MemorySnapshot*> that will be included in the | |
Mark Mentovai
2015/09/25 17:05:34
A, not an. Or for the comment, English is OK, so “
scottmg
2015/09/25 17:29:31
Really? :) I say "An ess tee dee vector..." when I
Mark Mentovai
2015/09/25 17:32:32
scottmg wrote:
| |
169 //! crash dump. Ownership of the pointers in the vector are not | |
Mark Mentovai
2015/09/25 17:05:34
is not transferred, there’s only one ownership. Or
Mark Mentovai
2015/09/25 17:05:35
Two spaces between the and pointers.
scottmg
2015/09/25 17:29:31
Oops, done.
scottmg
2015/09/25 17:29:31
Done.
| |
170 //! transferred to the caller, they are scoped to the lifetime of the | |
171 //! ProcessSnapshot object that they were obtained from. | |
172 virtual std::vector<const MemorySnapshot*> ExtraMemory() const = 0; | |
163 }; | 173 }; |
164 | 174 |
165 } // namespace crashpad | 175 } // namespace crashpad |
166 | 176 |
167 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ | 177 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ |
OLD | NEW |