| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 CodeViewRecordPDB70>; | 99 CodeViewRecordPDB70>; |
| 100 | 100 |
| 101 MinidumpModuleCodeViewRecordPDB70Writer:: | 101 MinidumpModuleCodeViewRecordPDB70Writer:: |
| 102 ~MinidumpModuleCodeViewRecordPDB70Writer() { | 102 ~MinidumpModuleCodeViewRecordPDB70Writer() { |
| 103 } | 103 } |
| 104 | 104 |
| 105 void MinidumpModuleCodeViewRecordPDB70Writer::InitializeFromSnapshot( | 105 void MinidumpModuleCodeViewRecordPDB70Writer::InitializeFromSnapshot( |
| 106 const ModuleSnapshot* module_snapshot) { | 106 const ModuleSnapshot* module_snapshot) { |
| 107 DCHECK_EQ(state(), kStateMutable); | 107 DCHECK_EQ(state(), kStateMutable); |
| 108 | 108 |
| 109 std::string name = module_snapshot->Name(); | 109 SetPDBName(module_snapshot->DebugFileName()); |
| 110 std::string leaf_name; | |
| 111 size_t last_slash = name.find_last_of('/'); | |
| 112 if (last_slash != std::string::npos) { | |
| 113 leaf_name = name.substr(last_slash + 1); | |
| 114 } else { | |
| 115 leaf_name = name; | |
| 116 } | |
| 117 SetPDBName(leaf_name); | |
| 118 | 110 |
| 119 UUID uuid; | 111 UUID uuid; |
| 120 uint32_t age; | 112 uint32_t age; |
| 121 module_snapshot->UUIDAndAge(&uuid, &age); | 113 module_snapshot->UUIDAndAge(&uuid, &age); |
| 122 SetUUIDAndAge(uuid, age); | 114 SetUUIDAndAge(uuid, age); |
| 123 } | 115 } |
| 124 | 116 |
| 125 MinidumpModuleMiscDebugRecordWriter::MinidumpModuleMiscDebugRecordWriter() | 117 MinidumpModuleMiscDebugRecordWriter::MinidumpModuleMiscDebugRecordWriter() |
| 126 : internal::MinidumpWritable(), | 118 : internal::MinidumpWritable(), |
| 127 image_debug_misc_(), | 119 image_debug_misc_(), |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 } | 444 } |
| 453 | 445 |
| 454 return file_writer->WriteIoVec(&iovecs); | 446 return file_writer->WriteIoVec(&iovecs); |
| 455 } | 447 } |
| 456 | 448 |
| 457 MinidumpStreamType MinidumpModuleListWriter::StreamType() const { | 449 MinidumpStreamType MinidumpModuleListWriter::StreamType() const { |
| 458 return kMinidumpStreamTypeModuleList; | 450 return kMinidumpStreamTypeModuleList; |
| 459 } | 451 } |
| 460 | 452 |
| 461 } // namespace crashpad | 453 } // namespace crashpad |
| OLD | NEW |