Closed AlexWhiter closed 6 years ago
Sounds like a worthwhile extension. Do you have an example pair of exe/dbg files so I can have a look how well this might be suited, especially considering the format of the DBG file and the contained CodeView entries?
Here's an archive with a small sample: https://yadi.sk/d/B9sY97BJ3TsVcV test.exe is just a simple program with recursion (to check if WinDBG can correctly unwind the stack using the resulting PDB), and test.dbg is a corresponding DBG made with map2dbd utility.
I've also added test_with_embedded_DBG.exe file which is test.exe with manually added CV data. cv2pdb can correctly process this file.
I couldn't find any documentation on the DBG file structure, but the headers are documented and declared in WinNT.h, look for IMAGE_SEPARATE_DEBUG_HEADER. The file layout seems to be as follows:
The data looks pretty simple to process. I've added conversion of DBG to PDB (see https://github.com/rainers/cv2pdb/commit/d67da0ec9481ca3ffe878ca68dfb64909040e231), but this still misses embedding the RSDS debug-link into the executable.
If you want to implement it I'll be happy to review and merge.
Great! I'll try to implement this.
Seems to be working. Thanks! :)
Hi,
For the projects built in Delphi , there's a map2dbg utility that allows for converting the MAP files into DBGs in regular NB09 format. Unfortunately, cv2pdb doesn't look for the external DBG file in case of IMAGE_FILE_DEBUG_STRIPPED flag set in PE header. Is it possible to add such feature? I can try to implement it if you agree to add this functionality.
Thank for the consideration!