Is it possible to (re)create a PDB file after a DLL is made
Asked Answered
P

1

14

I have the DLL and I have the exact sources used to create the DLL. I want our local symbol server to work when we get a dump file from customers. (Updating the DLL at the customer site can't be done before the next patch/release of our product)

Psychopharmacology answered 8/12, 2011 at 12:10 Comment(2)
Did you try to recompile this dll file?Aristippus
The debugger does not match the new PDB with the old DLL filePsychopharmacology
C
14

That seems to be not possible. Have a look at this here: Why does Visual Studio require debugger symbol files to exactly match the binary files that they were built with?

Or this article: PDB Files: What Every Developer Must Know

Quote out of "PDB Files: What Every...":

The extremely important part is how the debugger knows this is the exact matching PDB file for this binary. That's done through a GUID that's embedded in both the PDB file and the binary. If the GUID does not match, you certainly won't debug the module at the source code level.
The .NET compiler, and for native the linker, puts this GUID into the binary and PDB. Since the act of compiling creates this GUID, stop and think about this for a moment. If you have yesterday's build and did not save the PDB file will you ever be able to debug the binary again? No! This is why it is so critical to save your PDB files for every build. Because I know you're thinking it, I'll go ahead and answer the question already forming in your mind: no, there's no way to change the GUID.

Ceramic answered 8/12, 2011 at 12:21 Comment(2)
Looks like you are right. But it looks like chkmatch can be used in some cases: debuginfo.com/tools/chkmatch.htmlPsychopharmacology
Wow, interesting link! Ok, usually it is not possible. I hope that chkmatch can help you.Ceramic

© 2022 - 2024 — McMap. All rights reserved.