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

Side by Side Diff: snapshot/win/process_snapshot_win.h

Issue 1360863006: win: Add more memory regions to gathering of PEB (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-peb
Patch Set: . 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/win/process_reader_win.cc ('k') | snapshot/win/process_snapshot_win.cc » ('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 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 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 22 matching lines...) Expand all
33 #include "snapshot/system_snapshot.h" 33 #include "snapshot/system_snapshot.h"
34 #include "snapshot/thread_snapshot.h" 34 #include "snapshot/thread_snapshot.h"
35 #include "snapshot/win/exception_snapshot_win.h" 35 #include "snapshot/win/exception_snapshot_win.h"
36 #include "snapshot/win/memory_snapshot_win.h" 36 #include "snapshot/win/memory_snapshot_win.h"
37 #include "snapshot/win/module_snapshot_win.h" 37 #include "snapshot/win/module_snapshot_win.h"
38 #include "snapshot/win/system_snapshot_win.h" 38 #include "snapshot/win/system_snapshot_win.h"
39 #include "snapshot/win/thread_snapshot_win.h" 39 #include "snapshot/win/thread_snapshot_win.h"
40 #include "util/misc/initialization_state_dcheck.h" 40 #include "util/misc/initialization_state_dcheck.h"
41 #include "util/misc/uuid.h" 41 #include "util/misc/uuid.h"
42 #include "util/win/address_types.h" 42 #include "util/win/address_types.h"
43 #include "util/win/process_structs.h"
43 #include "util/stdlib/pointer_container.h" 44 #include "util/stdlib/pointer_container.h"
44 45
45 namespace crashpad { 46 namespace crashpad {
46 47
47 //! \brief A ProcessSnapshot of a running (or crashed) process running on a 48 //! \brief A ProcessSnapshot of a running (or crashed) process running on a
48 //! Windows system. 49 //! Windows system.
49 class ProcessSnapshotWin final : public ProcessSnapshot { 50 class ProcessSnapshotWin final : public ProcessSnapshot {
50 public: 51 public:
51 ProcessSnapshotWin(); 52 ProcessSnapshotWin();
52 ~ProcessSnapshotWin() override; 53 ~ProcessSnapshotWin() override;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const ExceptionSnapshot* Exception() const override; 128 const ExceptionSnapshot* Exception() const override;
128 std::vector<const MemorySnapshot*> ExtraMemory() const override; 129 std::vector<const MemorySnapshot*> ExtraMemory() const override;
129 130
130 private: 131 private:
131 // Initializes threads_ on behalf of Initialize(). 132 // Initializes threads_ on behalf of Initialize().
132 void InitializeThreads(); 133 void InitializeThreads();
133 134
134 // Initializes modules_ on behalf of Initialize(). 135 // Initializes modules_ on behalf of Initialize().
135 void InitializeModules(); 136 void InitializeModules();
136 137
138 // Initializes peb_memory_ on behalf of Initialize().
139 template <class Traits>
140 void InitializePebData();
141
142 void AddMemorySnapshot(WinVMAddress address,
143 WinVMSize size,
144 PointerVector<internal::MemorySnapshotWin>* into);
145
146 template <class Traits>
147 void AddMemorySnapshotForUNICODE_STRING(
148 const process_types::UNICODE_STRING<Traits>& us,
149 PointerVector<internal::MemorySnapshotWin>* into);
150
151 template <class Traits>
152 void AddMemorySnapshotForLdrLIST_ENTRY(
153 const process_types::LIST_ENTRY<Traits>& le,
154 size_t offset_of_member,
155 PointerVector<internal::MemorySnapshotWin>* into);
156
157 WinVMSize DetermineSizeOfEnvironmentBlock(
158 WinVMAddress start_of_environment_block);
159
137 internal::SystemSnapshotWin system_; 160 internal::SystemSnapshotWin system_;
138 internal::MemorySnapshotWin peb_; 161 PointerVector<internal::MemorySnapshotWin> peb_memory_;
139 PointerVector<internal::ThreadSnapshotWin> threads_; 162 PointerVector<internal::ThreadSnapshotWin> threads_;
140 PointerVector<internal::ModuleSnapshotWin> modules_; 163 PointerVector<internal::ModuleSnapshotWin> modules_;
141 scoped_ptr<internal::ExceptionSnapshotWin> exception_; 164 scoped_ptr<internal::ExceptionSnapshotWin> exception_;
142 ProcessReaderWin process_reader_; 165 ProcessReaderWin process_reader_;
143 UUID report_id_; 166 UUID report_id_;
144 UUID client_id_; 167 UUID client_id_;
145 std::map<std::string, std::string> annotations_simple_map_; 168 std::map<std::string, std::string> annotations_simple_map_;
146 timeval snapshot_time_; 169 timeval snapshot_time_;
147 InitializationStateDcheck initialized_; 170 InitializationStateDcheck initialized_;
148 171
149 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotWin); 172 DISALLOW_COPY_AND_ASSIGN(ProcessSnapshotWin);
150 }; 173 };
151 174
152 } // namespace crashpad 175 } // namespace crashpad
153 176
154 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_ 177 #endif // CRASHPAD_SNAPSHOT_WIN_PROCESS_SNAPSHOT_WIN_H_
OLDNEW
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | snapshot/win/process_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698