VS 2010 C ++ DLL中的调试问题 [英] Debugging problem in VS 2010 c++ dll

查看:114
本文介绍了VS 2010 C ++ DLL中的调试问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在c ++ dll中有一个代码(我仍然不知道它在做什么)
还有与此相关的应用程序.
但是我给出的断点显示消息sysmbols尚未加载.
当我转到模块"以加载符号时,C ++ dll中没有dll.
我附加的其他两个exe也不在列表中.

因此,一个基本问题是如何在VS 2010中调试c ++代码.

Hi
I have a code in c++ dll(I am not still aware wat it does)
and there are to application which has attached to this.
But the breakpoints I have given is showing message sysmbols are not loaded.
when I go to Modules to load symbol there is no dll with the c++ dll.
and the other two exe I attached also not in list.

SO basic question is how to debug c++ code in VS 2010

推荐答案

您的问题对我来说有点难以理解.我将重述一下,以便您可以看到我正确(或不正确)地理解您.如果我的理解在任何方面有误,请告诉我:

1.您要调试DLL
2.您拥有该DLL的C ++源代码
3.您正在使用VS 2010
4.您有两个应用程序(exe文件)
5.两个应用程序都使用该DLL(从中调用函数)
6.使用VS 2010在DLL的源代码中设置了断点.
7.您启动了一个或两个应用程序(是否启动了一个或两个?)
8.您将VS 2010调试器附加到了应用程序上(对吗?)
9.您收到一条消息,提示未加载符号"(如何?在哪里?)
10.断点不起作用

您还提到了一个列表,但找不到该列表中的应用程序-您的意思是什么列表?

作为一般建议,我想向您指出此链接: http://msdn.microsoft.com/zh-cn/library/x54fht41.aspx [ ^ ]

此外,错误消息未加载符号"可能提示两种可能的原因之一:

1.您没有符号文件(对于较旧的应用程序,该文件为* .pdb文件或* .dbg),或者VS 2010无法找到该文件

2. DLL不是作为调试版本加载的,而是作为发行版本加载的.在这种情况下,可能不会加载符号信息(这取决于用于创建发行版的编译器设置)

请检查是否存在这两种情况.
Your question was somewhat hard to understand for me. I will restate it so you can see I understand you correctly (or not). Please let me know if my understanding is wrong on any point:

1. You want to debug a DLL
2. You have the C++ source code for that DLL
3. You are using VS 2010
4. You have two applications (exe files)
5. Both applications use that DLL (call functions from it)
6. You''ve set Breakpoints in the source code of the DLL, using VS 2010
7. You started one or both of your applications (did you start one or both?)
8. You attached the VS 2010 debugger to an application (did you?)
9. You got a message saying that ''symbols are not loaded'' (how? where?)
10. Breakpoints did not work

You furthermore mention a list and that you can''t find the applications in it - what list do you mean?

As a general advice I would like to point you to this link: http://msdn.microsoft.com/en-us/library/x54fht41.aspx[^]

Furthermore the error message ''symbols are not loaded'' might hint at one of two possible causes:

1. You do not have the symbol file (the *.pdb file or *.dbg for older applications), or VS 2010 can not locate it

2. The DLL is not loaded as a debug version, but as a release version. In that case the symbol information might not be loaded (this depends on compiler settings used to create the release build)

Please check if any of these two is the case.


这篇关于VS 2010 C ++ DLL中的调试问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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