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

Side by Side Diff: minidump/minidump_memory_info_writer.h

Issue 1379873005: win: Write memory map info as MINIDUMP_MEMORY_INFO[_LIST] (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-peb-more-2
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 | « minidump/minidump_file_writer.cc ('k') | minidump/minidump_memory_info_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_INFO_WRITER_H_
16 #define CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_INFO_WRITER_H_
17
18 #include <windows.h>
19 #include <dbghelp.h>
20 #include <stdint.h>
21
22 #include <vector>
23
24 #include "base/basictypes.h"
25 #include "base/memory/scoped_ptr.h"
Mark Mentovai 2015/10/13 20:09:29 Unused
scottmg 2015/10/13 20:15:32 Done.
26 #include "minidump/minidump_stream_writer.h"
27 #include "minidump/minidump_writable.h"
28 #include "util/stdlib/pointer_container.h"
Mark Mentovai 2015/10/13 20:09:29 Unused.
scottmg 2015/10/13 20:15:32 Done.
29
30 namespace crashpad {
31
32 class MemoryMapRegionSnapshot;
33 class MinidumpContextWriter;
34 class MinidumpMemoryListWriter;
35 class MinidumpMemoryWriter;
36
37 //! \brief The writer for a MINIDUMP_MEMORY_INFO_LIST stream in a minidump file,
38 //! containing a list of MINIDUMP_MEMORY_INFO objects.
39 class MinidumpMemoryInfoListWriter final
40 : public internal::MinidumpStreamWriter {
41 public:
42 MinidumpMemoryInfoListWriter();
43 ~MinidumpMemoryInfoListWriter() override;
44
45 //! \brief Initializes a MINIDUMP_MEMORY_INFO_LIST based on \a memory_map.
46 //!
47 //! \param[in] memory_map The vector of memory map region snapshots to use as
48 //! source data.
49 //!
50 //! \note Valid in #kStateMutable.
51 void InitializeFromSnapshot(
52 const std::vector<const MemoryMapRegionSnapshot*>& memory_map);
53
54 protected:
55 // MinidumpWritable:
56 bool Freeze() override;
57 size_t SizeOfObject() override;
58 std::vector<internal::MinidumpWritable*> Children() override;
59 bool WriteObject(FileWriterInterface* file_writer) override;
60
61 // MinidumpStreamWriter:
62 MinidumpStreamType StreamType() const override;
63
64 private:
65 MINIDUMP_MEMORY_INFO_LIST memory_info_list_base_;
66 std::vector<MINIDUMP_MEMORY_INFO> items_;
67
68 DISALLOW_COPY_AND_ASSIGN(MinidumpMemoryInfoListWriter);
69 };
70
71 } // namespace crashpad
72
73 #endif // CRASHPAD_MINIDUMP_MINIDUMP_MEMORY_INFO_WRITER_H_
OLDNEW
« no previous file with comments | « minidump/minidump_file_writer.cc ('k') | minidump/minidump_memory_info_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698