Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 AddStream(exception.Pass()); | 86 AddStream(exception.Pass()); |
| 87 } | 87 } |
| 88 | 88 |
| 89 auto module_list = make_scoped_ptr(new MinidumpModuleListWriter()); | 89 auto module_list = make_scoped_ptr(new MinidumpModuleListWriter()); |
| 90 module_list->InitializeFromSnapshot(process_snapshot->Modules()); | 90 module_list->InitializeFromSnapshot(process_snapshot->Modules()); |
| 91 AddStream(module_list.Pass()); | 91 AddStream(module_list.Pass()); |
| 92 | 92 |
| 93 auto crashpad_info = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); | 93 auto crashpad_info = make_scoped_ptr(new MinidumpCrashpadInfoWriter()); |
| 94 crashpad_info->InitializeFromSnapshot(process_snapshot); | 94 crashpad_info->InitializeFromSnapshot(process_snapshot); |
| 95 | 95 |
| 96 memory_list->AddFromSnapshot(process_snapshot->ExtraMemory()); | |
|
Mark Mentovai
2015/09/25 17:32:32
It’s OK to do this after the crashpad_info stuff,
scottmg
2015/09/25 19:20:34
Hmm, you're right. OK, at the end it is: https://c
| |
| 97 | |
| 96 // Since the MinidumpCrashpadInfo stream is an extension, it’s safe to not add | 98 // Since the MinidumpCrashpadInfo stream is an extension, it’s safe to not add |
| 97 // it to the minidump file if it wouldn’t carry any useful information. | 99 // it to the minidump file if it wouldn’t carry any useful information. |
| 98 if (crashpad_info->IsUseful()) { | 100 if (crashpad_info->IsUseful()) { |
| 99 AddStream(crashpad_info.Pass()); | 101 AddStream(crashpad_info.Pass()); |
| 100 } | 102 } |
| 101 | 103 |
| 102 AddStream(memory_list.Pass()); | 104 AddStream(memory_list.Pass()); |
| 103 } | 105 } |
| 104 | 106 |
| 105 void MinidumpFileWriter::SetTimestamp(time_t timestamp) { | 107 void MinidumpFileWriter::SetTimestamp(time_t timestamp) { |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| OLD | NEW |