[Lldb-commits] [PATCH] D60501: Minidump: extend UUID byte-swapping to windows platform

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Apr 10 02:21:42 PDT 2019


labath created this revision.
labath added reviewers: clayborg, amccarth, markmentovai, asmith.

D59433 <https://reviews.llvm.org/D59433> added code to swap bytes UUIDs coming from minidump files, but
only enabled it for apple platforms. Based on my research, I believe
this is the correct thing to do for windows as well, as the natural way
of printing U(G)UIDs on this platforms is to print the first three
components as (4 or 2)-byte integers printed in natural (big-endian)
order. This makes the UUID string coming out of lldb match the strings
produced by other windows tools.

The decision to byte-swap the age field is somewhat arbitrary, because
the age field is usually printed separately of the file GUID (and often
in decimal). However, for our purposes (telling whether two files are
identical), including it in the UUID is correct, and printing it in
big-endian makes the it easier to recognize the age value.

This also makes the UUIDs generated here (almost) match up with the
UUIDs computed for breakpad symbol files
(BreakpadRecords.cpp:parseModuleId), which already implemented the
byte-swapping. The "almost" is here because ObjectFileBreakpad does not
swap the age field, but I'll fix that in a follow-up.

There is no UUID support in ObjectFileCOFF at the moment, but ideally
the algorithms used here and in ObjectFileCOFF should be in sync so that
object file matching works correctly.


https://reviews.llvm.org/D60501

Files:
  packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
  source/Plugins/Process/minidump/MinidumpParser.cpp
  source/Plugins/Process/minidump/MinidumpTypes.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60501.194467.patch
Type: text/x-patch
Size: 5544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190410/abc2dde3/attachment.bin>


More information about the lldb-commits mailing list