开发者

VS2010 C++ does not include paths to .pdb is my compiled .dlls according to dumpbin

Visual Studio compiles the projects into dlls as I want it to, but when I inspect these dlls with dumpbin, then they do not have an entry for their pdbs, which is probably the reason why I cannot debug any of those dlls if I load them at runtime and their pdbs are never loaded. How can I get VS to write these paths?

Visual Studio, C++.

Edit: C++/General/Debug Information format ist set to "Program Database (/Zi)" and L开发者_运维问答inker/Debugging/Generate Debug Info are on "Yes (/DEBUG)", which I believe are correct.


If dumpbin /headers shows no entry in the Debug Directories, it is probably because you did not enable debug information generation at compile and link time. You should check the C++/General/Debug Information format and the Linker/Debugging/Generate Debug Info options.

If these options are set, you may check if the dll and the pdb in the output directory of Visual match. With the Debugging Tools for Windows, you can use the command symchk /v yourdll /s folder_containing_pdb to verify if the pdb can be found by the debugger engine. It will check if the dll does not contain debug information, in which case you are missing an option in Visual Studio, or if the pdb file is not complete. You can also use Windbg with the command !sym noisy. See here for detailed instructions.


The pdbs aren't referenced in the dll, they get searched by Visual Studio. If they are in the same directory, it should find them.


You can direct Visual Studio on where to look for your symbols per this article. In summary:

Click Symbol File Path on the File menu to display, set, or append to the symbol path.

A more comprehensive overview of how symbols get used is here.

There should be info in the Output window on what happened when your DLL got loaded. Perhaps it's not the version you expected?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜