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

Side by Side Diff: minidump/minidump_file_writer.cc

Issue 1364053002: win: Save contents of PEB to minidump (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@save-teb
Patch Set: mac2 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 AddStream(misc_info.Pass()); 72 AddStream(misc_info.Pass());
73 73
74 auto memory_list = make_scoped_ptr(new MinidumpMemoryListWriter()); 74 auto memory_list = make_scoped_ptr(new MinidumpMemoryListWriter());
75 auto thread_list = make_scoped_ptr(new MinidumpThreadListWriter()); 75 auto thread_list = make_scoped_ptr(new MinidumpThreadListWriter());
76 thread_list->SetMemoryListWriter(memory_list.get()); 76 thread_list->SetMemoryListWriter(memory_list.get());
77 MinidumpThreadIDMap thread_id_map; 77 MinidumpThreadIDMap thread_id_map;
78 thread_list->InitializeFromSnapshot(process_snapshot->Threads(), 78 thread_list->InitializeFromSnapshot(process_snapshot->Threads(),
79 &thread_id_map); 79 &thread_id_map);
80 AddStream(thread_list.Pass()); 80 AddStream(thread_list.Pass());
81 81
82 memory_list->AddFromSnapshot(process_snapshot->ExtraMemory());
Mark Mentovai 2015/09/25 17:05:34 Was there a significance to this position? Just to
scottmg 2015/09/25 17:29:31 Not really, just the first place after memory_list
83
82 const ExceptionSnapshot* exception_snapshot = process_snapshot->Exception(); 84 const ExceptionSnapshot* exception_snapshot = process_snapshot->Exception();
83 if (exception_snapshot) { 85 if (exception_snapshot) {
84 auto exception = make_scoped_ptr(new MinidumpExceptionWriter()); 86 auto exception = make_scoped_ptr(new MinidumpExceptionWriter());
85 exception->InitializeFromSnapshot(exception_snapshot, thread_id_map); 87 exception->InitializeFromSnapshot(exception_snapshot, thread_id_map);
86 AddStream(exception.Pass()); 88 AddStream(exception.Pass());
87 } 89 }
88 90
89 auto module_list = make_scoped_ptr(new MinidumpModuleListWriter()); 91 auto module_list = make_scoped_ptr(new MinidumpModuleListWriter());
90 module_list->InitializeFromSnapshot(process_snapshot->Modules()); 92 module_list->InitializeFromSnapshot(process_snapshot->Modules());
91 AddStream(module_list.Pass()); 93 AddStream(module_list.Pass());
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 for (internal::MinidumpStreamWriter* stream : streams_) { 222 for (internal::MinidumpStreamWriter* stream : streams_) {
221 iov.iov_base = stream->DirectoryListEntry(); 223 iov.iov_base = stream->DirectoryListEntry();
222 iov.iov_len = sizeof(MINIDUMP_DIRECTORY); 224 iov.iov_len = sizeof(MINIDUMP_DIRECTORY);
223 iovecs.push_back(iov); 225 iovecs.push_back(iov);
224 } 226 }
225 227
226 return file_writer->WriteIoVec(&iovecs); 228 return file_writer->WriteIoVec(&iovecs);
227 } 229 }
228 230
229 } // namespace crashpad 231 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_file_writer_test.cc » ('j') | snapshot/minidump/process_snapshot_minidump.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698