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

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
« no previous file with comments | « handler/win/crashy_test_program.cc ('k') | minidump/minidump_thread_writer_test.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 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 // Do this in a separate loop to keep the thread stacks earlier in the dump,
155 // and together.
156 for (const ThreadSnapshot* thread_snapshot : thread_snapshots)
157 memory_list_writer_->AddFromSnapshot(thread_snapshot->ExtraMemory());
153 } 158 }
154 159
155 void MinidumpThreadListWriter::SetMemoryListWriter( 160 void MinidumpThreadListWriter::SetMemoryListWriter(
156 MinidumpMemoryListWriter* memory_list_writer) { 161 MinidumpMemoryListWriter* memory_list_writer) {
157 DCHECK_EQ(state(), kStateMutable); 162 DCHECK_EQ(state(), kStateMutable);
158 DCHECK(threads_.empty()); 163 DCHECK(threads_.empty());
159 164
160 memory_list_writer_ = memory_list_writer; 165 memory_list_writer_ = memory_list_writer;
161 } 166 }
162 167
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 227 }
223 228
224 return file_writer->WriteIoVec(&iovecs); 229 return file_writer->WriteIoVec(&iovecs);
225 } 230 }
226 231
227 MinidumpStreamType MinidumpThreadListWriter::StreamType() const { 232 MinidumpStreamType MinidumpThreadListWriter::StreamType() const {
228 return kMinidumpStreamTypeThreadList; 233 return kMinidumpStreamTypeThreadList;
229 } 234 }
230 235
231 } // namespace crashpad 236 } // namespace crashpad
OLDNEW
« no previous file with comments | « handler/win/crashy_test_program.cc ('k') | minidump/minidump_thread_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698