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

Side by Side Diff: minidump/minidump_module_writer.cc

Issue 1418613013: Capture UUID age field on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 1 month 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 | « no previous file | minidump/minidump_module_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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 std::string leaf_name; 110 std::string leaf_name;
111 size_t last_slash = name.find_last_of('/'); 111 size_t last_slash = name.find_last_of('/');
112 if (last_slash != std::string::npos) { 112 if (last_slash != std::string::npos) {
113 leaf_name = name.substr(last_slash + 1); 113 leaf_name = name.substr(last_slash + 1);
114 } else { 114 } else {
115 leaf_name = name; 115 leaf_name = name;
116 } 116 }
117 SetPDBName(leaf_name); 117 SetPDBName(leaf_name);
118 118
119 UUID uuid; 119 UUID uuid;
120 module_snapshot->UUID(&uuid); 120 uint32_t age;
121 SetUUIDAndAge(uuid, 0); 121 module_snapshot->UUIDAndAge(&uuid, &age);
122 SetUUIDAndAge(uuid, age);
122 } 123 }
123 124
124 MinidumpModuleMiscDebugRecordWriter::MinidumpModuleMiscDebugRecordWriter() 125 MinidumpModuleMiscDebugRecordWriter::MinidumpModuleMiscDebugRecordWriter()
125 : internal::MinidumpWritable(), 126 : internal::MinidumpWritable(),
126 image_debug_misc_(), 127 image_debug_misc_(),
127 data_(), 128 data_(),
128 data_utf16_() { 129 data_utf16_() {
129 } 130 }
130 131
131 MinidumpModuleMiscDebugRecordWriter::~MinidumpModuleMiscDebugRecordWriter() { 132 MinidumpModuleMiscDebugRecordWriter::~MinidumpModuleMiscDebugRecordWriter() {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 452 }
452 453
453 return file_writer->WriteIoVec(&iovecs); 454 return file_writer->WriteIoVec(&iovecs);
454 } 455 }
455 456
456 MinidumpStreamType MinidumpModuleListWriter::StreamType() const { 457 MinidumpStreamType MinidumpModuleListWriter::StreamType() const {
457 return kMinidumpStreamTypeModuleList; 458 return kMinidumpStreamTypeModuleList;
458 } 459 }
459 460
460 } // namespace crashpad 461 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_module_writer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698