Without knowing how exactly you are compressing and encrypting your binaries, it's hard for me to be very specific. This blog post by John Robbins
points out that executable images are associated with their PDBs via a GUID that's embedded in the executable's PE header. You should be able to view it by running DUMPBIN /HEADERS on the executable, and looking for the output of Debug Directories. If your compression and encryption has modified the PE headers such that this information isn't available (or correct), then it would explain why your debugger can't find anything.
There are a few approaches that I think that you could take to resolve this issue. To really try to get this to work, you might want to consider using WinDbg instead of the Visual Studio debugger. You'll understand why I am recommending this in a moment...
WinDbg provides some options that allow the relaxed loading of symbol files. The idea with this option is that, if the source code hasn't changed but the binaries are from a different build than the PDB, the GUID check can be waived and the mismatched symbol file can be loaded. I don't know how well this will work with your compression and encryption, so YMMV.
WinDbg and its accompanying tools can be used to dump the GUID from both the executable and the PDB, but I'm omitting that for now because I am hoping that those steps won't be necessary.
After you have opened your minidump in WinDbg, you will need to enter several commands into the command line to get this all to work:
ld <exe name>
The first command enables the SYMOPT_LOAD_ANYTHING
option that skips the GUID check. The !sym
command enables verbose output for symbol loading so that you may see more detailed error messages. The ld
command directs WinDbg to try to load the symbols for the executable name that you will type in the place of <exe name>
. If you repeat the ld
command, WinDbg will indicate if it successfully loaded the symbols the first time.
Hopefully this helps -- again, I don't know how well this will work with your compression and encryption, but it's worth trying.