cv2pdb
cv2pdb copied to clipboard
Using separate DWARF debugging symbols as input
If I have a stripped executable with its DWARF debugging symbols as a separate file (stripped via objcopy), would it be possible to convert those into PDB symbols instead? Thanks!
What's your command line for keeping debug symbols in a separate file? I haven't found anything appropriate with --help.
If you want to ship an executable with stripped debug info, but keep the PDB for later crash dump analysis, have you tried to reverse the steps? Generate the PDB with cv2pdb, then strip DWARF info could work (or need a lot less changes).
I am using mingw-w64 from the msys2 project, specifically objcopy
and strip
from the binutils package (mingw-w64-i686-binutils
).
To extract the symbols, I run:
objcopy --only-keep-debug my-binary.exe my-binary.debug
To strip the binary, I run:
strip my-binary.exe -so my-stripped-binary.exe
But I think you can also just make use of objcopy
only, maybe:
objcopy --strip-all my-binary.exe my-stripped-binary.exe
I hadn't thought about the reverse method of generating the PDB first, then stripping the DWARF symbols - I'll keep that in mind, thanks!
@jtanx hello, is the suggested method of converting to PDB and only then stripping the debug symbols working? I am facing the same problem and wonder if I need to modify the cv2pdb or not.
@foxeed I'm unaware of any changes to converting separate DWARF symbols. I haven't tried the other method, but I don't see why it won't work
You can not use separate DWARF symbols because you have to understand exactly where linker relocates the object data to.
By mistake