Attempt #2 to get this patch working. I will watch the build bots carefully today.
authorGreg Clayton <gclayton@apple.com>
Wed, 3 Apr 2019 16:30:44 +0000 (16:30 +0000)
committerGreg Clayton <gclayton@apple.com>
Wed, 3 Apr 2019 16:30:44 +0000 (16:30 +0000)
commitbbc428e93a7dabd4223157c878db0ae37e8d7580
tree67bbf3bf4a04d4928be4b7e01c57e37315f5c78f
parent8d248dbd774a5870dd9aabdbfafecc8dc82f8c42
Attempt #2 to get this patch working. I will watch the build bots carefully today.

Allow partial UUID matching in Minidump core file plug-in

Breakpad had bugs in earlier versions where it would take a 20 byte ELF build ID and put it into the minidump file as a 16 byte PDB70 UUID with an age of zero. This would make it impossible to do postmortem debugging with one of these older minidump files.

This fix allows partial matching of UUIDs. To do this we first try and match with the full UUID value, and then fall back to removing the original directory path from the module specification and we remove the UUID requirement, and then manually do the matching ourselves. This allows scripts to find symbols files using a symbol server, place them all in a directory, use the "setting set target.exec-search-paths" setting to specify the directory, and then load the core file. The Target::GetSharedModule() can then find the correct file without doing any other matching and load it.

Tests were added to cover a partial UUID match where the breakpad file has a 16 byte UUID and the actual file on disk has a 20 byte UUID, both where the first 16 bytes match, and don't match.

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

llvm-svn: 357603
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmatch.yaml [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/libuuidmismatch.yaml [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-match.dmp [new file with mode: 0644]
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-partial-uuids-mismatch.dmp [new file with mode: 0644]
lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp