llvm-project/lldb/source/Plugins/Process/minidump
Pavel Labath 71b88b91f7 Minidump: extend UUID byte-swapping to windows platform
Summary:
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 from 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 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.

Reviewers: clayborg, amccarth, markmentovai, asmith

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D60501

llvm-svn: 358169
2019-04-11 14:14:07 +00:00
..
CMakeLists.txt MinidumpParser: use minidump parser in llvm/Object 2019-04-05 07:56:39 +00:00
MinidumpParser.cpp Minidump: extend UUID byte-swapping to windows platform 2019-04-11 14:14:07 +00:00
MinidumpParser.h Minidump: Use llvm parser for reading the ModuleList stream 2019-04-10 11:07:28 +00:00
MinidumpTypes.cpp Minidump: Use llvm parser for reading the ModuleList stream 2019-04-10 11:07:28 +00:00
MinidumpTypes.h Minidump: extend UUID byte-swapping to windows platform 2019-04-11 14:14:07 +00:00
NtStructures.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProcessMinidump.cpp Minidump: Use llvm parser for reading the ModuleList stream 2019-04-10 11:07:28 +00:00
ProcessMinidump.h Avoid two-stage initialization of MinidumpParser 2019-02-22 13:36:01 +00:00
RegisterContextMinidump_ARM.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_ARM.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_ARM64.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_ARM64.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_x86_32.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_x86_32.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_x86_64.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterContextMinidump_x86_64.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThreadMinidump.cpp Replace 'ap' with 'up' suffix in variable names. (NFC) 2019-02-13 06:25:41 +00:00
ThreadMinidump.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00