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

后端 未结 1 1615
北恋
北恋 2021-02-07 15:16

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 custo

相关标签:
1条回答
  • 2021-02-07 15:49

    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.

    0 讨论(0)
提交回复
热议问题