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

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 29 10:27:31 PDT 2018


For PE/COFF files, the Age is also in the executable and Guid+Age actually
constitute a 20-byte UUID. Is this not the case on Apple? What object file
format are you dealing with?
On Wed, Aug 29, 2018 at 10:11 AM Greg Clayton via Phabricator <
reviews at reviews.llvm.org> wrote:

> clayborg created this revision.
> clayborg added reviewers: zturner, labath, dvlahovski, lemo.
>
> The CvRecordPdb70 structure looks like:
>
>   struct CvRecordPdb70 {
>     uint8_t Uuid[16];
>     llvm::support::ulittle32_t Age;
>     // char PDBFileName[];
>   };
>
> We are currently including the "Age" in the UUID which seems wrong. I am
> proposing this fix to avoid including the age in the UUID since it is wrong
> for Apple targets. We want the UUID of a module to match the UUID that
> would be found in executable files. I can modify this patch to only do this
> for Apple vendors in the target triple if needed, but it seemed like this
> would be the functionality that people would expect on all targets, so I
> will start with this patch and see what people think.
>
>
> 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
> @@ -81,7 +81,7 @@
>      const CvRecordPdb70 *pdb70_uuid = nullptr;
>      Status error = consumeObject(cv_record, pdb70_uuid);
>      if (!error.Fail())
> -      return UUID::fromData(pdb70_uuid, sizeof(*pdb70_uuid));
> +      return UUID::fromData(pdb70_uuid->Uuid, sizeof(pdb70_uuid->Uuid));
>    } else if (cv_signature == CvSignature::ElfBuildId)
>      return UUID::fromData(cv_record);
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180829/3498f888/attachment-0001.html>


More information about the lldb-commits mailing list