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.
The second failure I had was due to the full module showing up when the module was found, so this check failed.
The interesting part (and the reason why I checked out this patch) was that the module was still being found even when I removed the basename_module_spec.GetFileSpec().GetDirectory().Clear(); line, which was my last uncertainty about this patch. So now I even more strongly believe that the clearing of the directory file spec is unnecessary and should be removed.