[Lldb-commits] [PATCH] D51442: Don't include the Age in the UUID for CvRecordPdb70 UUID records in minidump files

Phabricator via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 29 13:35:17 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rLLDB340966: Don't include the Age in the UUID for CvRecordPdb70 UUID records in minidump… (authored by gclayton, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D51442?vs=163143&id=163182#toc

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D51442

Files:
  source/Plugins/Process/minidump/MinidumpParser.cpp


Index: source/Plugins/Process/minidump/MinidumpParser.cpp
===================================================================
--- source/Plugins/Process/minidump/MinidumpParser.cpp
+++ source/Plugins/Process/minidump/MinidumpParser.cpp
@@ -80,8 +80,18 @@
     // 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);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51442.163182.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180829/5e913257/attachment.bin>


More information about the lldb-commits mailing list