rainers / cv2pdb

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

Fix `.exe` files (according to dumpbin/objdump) #58

Closed dscho closed 4 years ago

dscho commented 4 years ago

This PR is intended to fix https://github.com/rainers/cv2pdb/issues/35: dumpbin/objdump stumble over the output of cv2pdb because the resulting .exe files have information about a symbol table that is not actually there.

rainers commented 4 years ago

Looks reasonable to me. Two notes:

dscho commented 4 years ago
  • you don't have to check the machine type, the FileHeader part is identical across architectures.

  • maybe the pointer to symbol table should only be erased if it is actually pointing inside the erased section

Okay, thank you for those suggestions. I think I managed to implement both correctly.