rainers / cv2pdb

converter of DMD CodeView/DWARF debug information to PDB files
Artistic License 2.0
466 stars 110 forks source link

Add rudimentary support for DWARF5 #67

Closed dscho closed 2 years ago

dscho commented 2 years ago

This allows cv2pdb to process executables produced by the mingw-w64 version of GCC v11.x. The symptoms of the fixed issue would look like this:

error: cannot add line number info to module

We will most likely have to run with this patch to allow building Git for Windows henceforth, as we use the mingw-w64 version of GCC provided by the MSYS2 project, and they recently upgraded to GCC v11.x (where it seems impossible to force an older DWARF version via -gdwarf-<version> -gstrict-dwarf).

This fixes https://github.com/git-for-windows/git/issues/3488.

rainers commented 2 years ago

Thanks for your contribution. I'll have to trust you on this change, but I see that older DWARF versions should be unaffected.

dscho commented 2 years ago

Heh, I had hoped that somebody more knowledgeable than I would double-check my work :-)

Having said that, I went by the official specs and verified that it works using a freshly-built git.exe, so I am reasonably confident that it's doing what it should be doing.