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

喜夏-厌秋 提交于 2019-12-04 10:45:44

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/8430820/is-it-possible-to-recreate-a-pdb-file-after-a-dll-is-made

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!