rainers / cv2pdb

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

Strip DWARF debug information from executable #6

Closed net147 closed 9 years ago

net147 commented 9 years ago

It would be nice if it were possible to strip the DWARF debugging information from the executable while maintaining compatibility with the generated PDB.

net147 commented 9 years ago

Alternatively, could we have an option to write a .debug codeview section to an executable for an existing .pdb so something like the following could be done using cv2pdb and MinGW binutils?

cv2pdb -C DebugTest.exe
strip DebugTest.exe
cv2pdb -pDebugTest.pdb DebugTest.exe
rainers commented 9 years ago

If the debug sections are at the end of the section list, it should not be too difficult to remove them. This is also what's done with CV4 debug sections.

net147 commented 9 years ago

Last I checked they are.

rainers commented 9 years ago

I implemented always stripping the DWARF sections (if they are at the end). Please try latest git HEAD.

net147 commented 9 years ago

It works. Thanks.