Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: snapshot/process_snapshot.h

Issue 1377133006: Mostly-boilerplate to add MemoryMapSnapshot (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@memory-info-to-misc
Patch Set: fixes Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « snapshot/minidump/process_snapshot_minidump.cc ('k') | snapshot/snapshot.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 MemoryMapRegionSnapshot;
30 class MemorySnapshot; 31 class MemorySnapshot;
31 class ModuleSnapshot; 32 class ModuleSnapshot;
32 class SystemSnapshot; 33 class SystemSnapshot;
33 class ThreadSnapshot; 34 class ThreadSnapshot;
34 35
35 //! \brief An abstract interface to a snapshot representing the state of a 36 //! \brief An abstract interface to a snapshot representing the state of a
36 //! process. 37 //! process.
37 //! 38 //!
38 //! This is the top-level object in a family of Snapshot objects, because it 39 //! This is the top-level object in a family of Snapshot objects, because it
39 //! gives access to a SystemSnapshot, vectors of ModuleSnapshot and 40 //! gives access to a SystemSnapshot, vectors of ModuleSnapshot and
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 156
156 //! \brief Returns an ExceptionSnapshot reflecting the exception that the 157 //! \brief Returns an ExceptionSnapshot reflecting the exception that the
157 //! snapshot process sustained to trigger the snapshot being taken. 158 //! snapshot process sustained to trigger the snapshot being taken.
158 //! 159 //!
159 //! \return An ExceptionSnapshot object. The caller does not take ownership of 160 //! \return An ExceptionSnapshot object. The caller does not take ownership of
160 //! this object, it is scoped to the lifetime of the ProcessSnapshot 161 //! this object, it is scoped to the lifetime of the ProcessSnapshot
161 //! object that it was obtained from. If the snapshot is not a result of 162 //! object that it was obtained from. If the snapshot is not a result of
162 //! an exception, returns `nullptr`. 163 //! an exception, returns `nullptr`.
163 virtual const ExceptionSnapshot* Exception() const = 0; 164 virtual const ExceptionSnapshot* Exception() const = 0;
164 165
166 //! \brief Returns MemoryMapRegionSnapshot objects reflecting the regions
167 //! of the memory map in the snapshot process at the time of the snapshot.
168 //!
169 //! \return A vector of MemoryMapRegionSnapshot objects. The caller does not
170 //! take ownership of these objects, they are scoped to the lifetime of
171 //! the ProcessSnapshot object that they were obtained from.
172 virtual std::vector<const MemoryMapRegionSnapshot*> MemoryMap() const = 0;
173
165 //! \brief Returns a vector of additional memory blocks that should be 174 //! \brief Returns a vector of additional memory blocks that should be
166 //! included in a minidump. 175 //! included in a minidump.
167 //! 176 //!
168 //! \return An vector of MemorySnapshot objects that will be included in the 177 //! \return An vector of MemorySnapshot objects that will be included in the
169 //! crash dump. The caller does not take ownership of these objects, they 178 //! crash dump. The caller does not take ownership of these objects, they
170 //! are scoped to the lifetime of the ProcessSnapshot object that they 179 //! are scoped to the lifetime of the ProcessSnapshot object that they
171 //! were obtained from. 180 //! were obtained from.
172 virtual std::vector<const MemorySnapshot*> ExtraMemory() const = 0; 181 virtual std::vector<const MemorySnapshot*> ExtraMemory() const = 0;
173 }; 182 };
174 183
175 } // namespace crashpad 184 } // namespace crashpad
176 185
177 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_ 186 #endif // CRASHPAD_SNAPSHOT_PROCESS_SNAPSHOT_H_
OLDNEW
« no previous file with comments | « snapshot/minidump/process_snapshot_minidump.cc ('k') | snapshot/snapshot.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698