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

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: . 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 MinidumpThreadIDMap* thread_id_map) { 142 MinidumpThreadIDMap* thread_id_map) {
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 memory_list_writer_->AddFromSnapshot(thread_snapshot->ExtraMemory());
Mark Mentovai 2015/09/29 22:14:04 For purposes of locality in the minidump file, I’d
scottmg 2015/09/30 18:54:11 Done.
152 } 153 }
153 } 154 }
154 155
155 void MinidumpThreadListWriter::SetMemoryListWriter( 156 void MinidumpThreadListWriter::SetMemoryListWriter(
156 MinidumpMemoryListWriter* memory_list_writer) { 157 MinidumpMemoryListWriter* memory_list_writer) {
157 DCHECK_EQ(state(), kStateMutable); 158 DCHECK_EQ(state(), kStateMutable);
158 DCHECK(threads_.empty()); 159 DCHECK(threads_.empty());
159 160
160 memory_list_writer_ = memory_list_writer; 161 memory_list_writer_ = memory_list_writer;
161 } 162 }
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 223 }
223 224
224 return file_writer->WriteIoVec(&iovecs); 225 return file_writer->WriteIoVec(&iovecs);
225 } 226 }
226 227
227 MinidumpStreamType MinidumpThreadListWriter::StreamType() const { 228 MinidumpStreamType MinidumpThreadListWriter::StreamType() const {
228 return kMinidumpStreamTypeThreadList; 229 return kMinidumpStreamTypeThreadList;
229 } 230 }
230 231
231 } // namespace crashpad 232 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698