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

Side by Side Diff: snapshot/test/test_process_snapshot.cc

Issue 1364053002: win: Save contents of PEB to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-teb
Patch Set: test 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
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,
(...skipping 12 matching lines...) Expand all
23 : process_id_(0), 23 : process_id_(0),
24 parent_process_id_(0), 24 parent_process_id_(0),
25 snapshot_time_(), 25 snapshot_time_(),
26 process_start_time_(), 26 process_start_time_(),
27 process_cpu_user_time_(), 27 process_cpu_user_time_(),
28 process_cpu_system_time_(), 28 process_cpu_system_time_(),
29 report_id_(), 29 report_id_(),
30 client_id_(), 30 client_id_(),
31 annotations_simple_map_(), 31 annotations_simple_map_(),
32 system_(), 32 system_(),
33 peb_(),
33 threads_(), 34 threads_(),
34 modules_(), 35 modules_(),
35 exception_() { 36 exception_() {
36 } 37 }
37 38
38 TestProcessSnapshot::~TestProcessSnapshot() { 39 TestProcessSnapshot::~TestProcessSnapshot() {
39 } 40 }
40 41
41 pid_t TestProcessSnapshot::ProcessID() const { 42 pid_t TestProcessSnapshot::ProcessID() const {
42 return process_id_; 43 return process_id_;
(...skipping 27 matching lines...) Expand all
70 71
71 const std::map<std::string, std::string>& 72 const std::map<std::string, std::string>&
72 TestProcessSnapshot::AnnotationsSimpleMap() const { 73 TestProcessSnapshot::AnnotationsSimpleMap() const {
73 return annotations_simple_map_; 74 return annotations_simple_map_;
74 } 75 }
75 76
76 const SystemSnapshot* TestProcessSnapshot::System() const { 77 const SystemSnapshot* TestProcessSnapshot::System() const {
77 return system_.get(); 78 return system_.get();
78 } 79 }
79 80
81 const MemorySnapshot* TestProcessSnapshot::Peb() const {
82 return peb_.get();
83 }
84
80 std::vector<const ThreadSnapshot*> TestProcessSnapshot::Threads() const { 85 std::vector<const ThreadSnapshot*> TestProcessSnapshot::Threads() const {
81 std::vector<const ThreadSnapshot*> threads; 86 std::vector<const ThreadSnapshot*> threads;
82 for (const ThreadSnapshot* thread : threads_) { 87 for (const ThreadSnapshot* thread : threads_) {
83 threads.push_back(thread); 88 threads.push_back(thread);
84 } 89 }
85 return threads; 90 return threads;
86 } 91 }
87 92
88 std::vector<const ModuleSnapshot*> TestProcessSnapshot::Modules() const { 93 std::vector<const ModuleSnapshot*> TestProcessSnapshot::Modules() const {
89 std::vector<const ModuleSnapshot*> modules; 94 std::vector<const ModuleSnapshot*> modules;
90 for (const ModuleSnapshot* module : modules_) { 95 for (const ModuleSnapshot* module : modules_) {
91 modules.push_back(module); 96 modules.push_back(module);
92 } 97 }
93 return modules; 98 return modules;
94 } 99 }
95 100
96 const ExceptionSnapshot* TestProcessSnapshot::Exception() const { 101 const ExceptionSnapshot* TestProcessSnapshot::Exception() const {
97 return exception_.get(); 102 return exception_.get();
98 } 103 }
99 104
100 } // namespace test 105 } // namespace test
101 } // namespace crashpad 106 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698