[all-commits] [llvm/llvm-project] c8daf4: [lldb] Add gnu-debuglink support for Windows PE/COFF

Martin Storsjö via All-commits all-commits at lists.llvm.org
Thu Jun 9 04:40:12 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c8daf4a707ad502b9694461246114bba01af5222
      https://github.com/llvm/llvm-project/commit/c8daf4a707ad502b9694461246114bba01af5222
  Author: Alvin Wong <alvin at alvinhc.com>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    M lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
    M lldb/source/Plugins/SymbolVendor/CMakeLists.txt
    A lldb/source/Plugins/SymbolVendor/PECOFF/CMakeLists.txt
    A lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.cpp
    A lldb/source/Plugins/SymbolVendor/PECOFF/SymbolVendorPECOFF.h
    M lldb/source/Symbol/LocateSymbolFile.cpp
    M lldb/test/Shell/Minidump/Windows/Inputs/find-module.exe.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink-i686.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink-mismatched-crc.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink-pdb-buildid.yaml
    A lldb/test/Shell/ObjectFile/PECOFF/dwarf-gnu-debuglink.yaml

  Log Message:
  -----------
  [lldb] Add gnu-debuglink support for Windows PE/COFF

The specification of gnu-debuglink can be found at:
https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

The file CRC or the CRC value from the .gnu_debuglink section is now
used to calculate the module UUID as a fallback, to allow verifying that
the debug object does match the executable. Note that if a CodeView
build id exists, it still takes precedence. This works even for MinGW
builds because LLD writes a synthetic CodeView build id which does not
get stripped from the debug object.

The `Minidump/Windows/find-module` test also needs a fix by adding a
CodeView record to the exe to match the one in the minidump, otherwise
it fails due to the new UUID calculated from the file CRC.

Fixes https://github.com/llvm/llvm-project/issues/54344

Reviewed By: DavidSpickett

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


  Commit: 39c4ac140d1ee67d152c990f5d16a8df98155cbc
      https://github.com/llvm/llvm-project/commit/39c4ac140d1ee67d152c990f5d16a8df98155cbc
  Author: Martin Storsjö <martin at martin.st>
  Date:   2022-06-09 (Thu, 09 Jun 2022)

  Changed paths:
    M lldb/source/Target/Target.cpp

  Log Message:
  -----------
  [lldb] Silence a GCC warning about missing returns after a fully covered switch. NFC.


Compare: https://github.com/llvm/llvm-project/compare/264d1136f9ae...39c4ac140d1e


More information about the All-commits mailing list