是否可以仅使用PDB调试而没有源代码的DLL? [英] Is it possible to debug into a DLL with only a PDB and no source code?

查看:446
本文介绍了是否可以仅使用PDB调试而没有源代码的DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Visual Studio中调试一个调用dll的exe。我确保在与dll相同的路径中有对应的pdb。

I'm trying to debug an exe that calls a dll, in Visual Studio. I made sure I had the corresponding pdb in the same path as the dll.

但是我无法进入dll提供的功能。
我收到一条消息,指出未找到xyz.c。

But I cannot get into the functions that the dll is offering. I get a message that says "xyz.c was not found"

为什么收到此消息?

这是否意味着我不能仅从DLL + .PDB进入源代码?
使用/ Z7选项构建的静态库(.lib)怎么样?

Does this mean that I can't get into the source code just from a DLL + .PDB? What about a static library (.lib) built using the /Z7 option?

推荐答案

否,您需要

pdb(或/ Z7)包含调试信息,就像可执行代码和源代码之间的映射一样。使用pdb VS调试器可以知道每个指令在源文件中的位置,但是它仍然需要有源文件才能向您显示代码。

pdb (or /Z7) contains debug information which is like mapping between executable code and your source code. With pdb VS debugger knows where in source files each instruction is located, but it still needs to have source files to show you the code.

通常pdb文件存储源代码的位置文件和VS调试器知道在哪里可以找到它们。如果将src文件移动到其他位置,则AFAIK VS将显示一个弹出对话框,以浏览找不到的.c / .cpp文件。

Usually pdb file stores location of source files and VS debugger knows where to find them. If you move src files somewhere else then AFAIK VS will show a popup dialog to browse for .c/.cpp file that it cannot find.

这篇关于是否可以仅使用PDB调试而没有源代码的DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆