diff options
| author | Greg Clayton <gclayton@apple.com> | 2018-08-29 20:34:08 +0000 |
|---|---|---|
| committer | Greg Clayton <gclayton@apple.com> | 2018-08-29 20:34:08 +0000 |
| commit | 77c57200f8f7a20eb71fc1a286fe5593d5a01f6e (patch) | |
| tree | a586c39900736768acdc99acc9a0c4a7f6301000 | |
| parent | 9ff67a9dda045d82f378f0d3427b918da3c60fef (diff) | |
| download | bcm5719-llvm-77c57200f8f7a20eb71fc1a286fe5593d5a01f6e.tar.gz bcm5719-llvm-77c57200f8f7a20eb71fc1a286fe5593d5a01f6e.zip | |
Don't include the Age in the UUID for CvRecordPdb70 UUID records in minidump files for Apple vendors.
The CvRecordPdb70 structure looks like:
struct CvRecordPdb70 {
uint8_t Uuid[16];
llvm::support::ulittle32_t Age;
// char PDBFileName[];
};
We were including the "Age" in the UUID for Apple vedors which caused us to not be able to match the UUID to built binaries. The "Age" field is set to zero in breakpad minidump files for Apple targets.
Differential Revision: https://reviews.llvm.org/D51442
llvm-svn: 340966
| -rw-r--r-- | lldb/source/Plugins/Process/minidump/MinidumpParser.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp b/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp index ce65fb9e673..c79f90206d7 100644 --- a/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp +++ b/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp @@ -80,8 +80,18 @@ UUID MinidumpParser::GetModuleUUID(const MinidumpModule *module) { // PDB70 record const CvRecordPdb70 *pdb70_uuid = nullptr; Status error = consumeObject(cv_record, pdb70_uuid); - if (!error.Fail()) - return UUID::fromData(pdb70_uuid, sizeof(*pdb70_uuid)); + if (!error.Fail()) { + auto arch = GetArchitecture(); + // For Apple targets we only need a 16 byte UUID so that we can match + // the UUID in the Module to actual UUIDs from the built binaries. The + // "Age" field is zero in breakpad minidump files for Apple targets, so + // we restrict the UUID to the "Uuid" field so we have a UUID we can use + // to match. + if (arch.GetTriple().getVendor() == llvm::Triple::Apple) + return UUID::fromData(pdb70_uuid->Uuid, sizeof(pdb70_uuid->Uuid)); + else + return UUID::fromData(pdb70_uuid, sizeof(*pdb70_uuid)); + } } else if (cv_signature == CvSignature::ElfBuildId) return UUID::fromData(cv_record); |

