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

Side by Side Diff: minidump/minidump_thread_writer.cc

Issue 1364803004: win: Save contents of TEBs allowing !teb and !gle to work in windbg (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@dump-without-crashing
Patch Set: rebase 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 DCHECK_EQ(state(), kStateMutable); 143 DCHECK_EQ(state(), kStateMutable);
144 DCHECK(threads_.empty()); 144 DCHECK(threads_.empty());
145 145
146 BuildMinidumpThreadIDMap(thread_snapshots, thread_id_map); 146 BuildMinidumpThreadIDMap(thread_snapshots, thread_id_map);
147 147
148 for (const ThreadSnapshot* thread_snapshot : thread_snapshots) { 148 for (const ThreadSnapshot* thread_snapshot : thread_snapshots) {
149 auto thread = make_scoped_ptr(new MinidumpThreadWriter()); 149 auto thread = make_scoped_ptr(new MinidumpThreadWriter());
150 thread->InitializeFromSnapshot(thread_snapshot, thread_id_map); 150 thread->InitializeFromSnapshot(thread_snapshot, thread_id_map);
151 AddThread(thread.Pass()); 151 AddThread(thread.Pass());
152 } 152 }
153
154 for (const ThreadSnapshot* thread_snapshot : thread_snapshots)
Mark Mentovai 2015/10/01 20:28:05 This does deserve a comment explaining why we’re d
scottmg 2015/10/01 21:01:07 Done.
155 memory_list_writer_->AddFromSnapshot(thread_snapshot->ExtraMemory());
153 } 156 }
154 157
155 void MinidumpThreadListWriter::SetMemoryListWriter( 158 void MinidumpThreadListWriter::SetMemoryListWriter(
156 MinidumpMemoryListWriter* memory_list_writer) { 159 MinidumpMemoryListWriter* memory_list_writer) {
157 DCHECK_EQ(state(), kStateMutable); 160 DCHECK_EQ(state(), kStateMutable);
158 DCHECK(threads_.empty()); 161 DCHECK(threads_.empty());
159 162
160 memory_list_writer_ = memory_list_writer; 163 memory_list_writer_ = memory_list_writer;
161 } 164 }
162 165
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 225 }
223 226
224 return file_writer->WriteIoVec(&iovecs); 227 return file_writer->WriteIoVec(&iovecs);
225 } 228 }
226 229
227 MinidumpStreamType MinidumpThreadListWriter::StreamType() const { 230 MinidumpStreamType MinidumpThreadListWriter::StreamType() const {
228 return kMinidumpStreamTypeThreadList; 231 return kMinidumpStreamTypeThreadList;
229 } 232 }
230 233
231 } // namespace crashpad 234 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698