在VS2005(VC8.0)中进行调试,并尝试查看VC 6.0 DLL中的变量 [英] Debugging in VS2005 (VC8.0) and trying to see variables in a VC 6.0 DLL

查看:155
本文介绍了在VS2005(VC8.0)中进行调试,并尝试查看VC 6.0 DLL中的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用VS2005编写的程序,并有一个用VC 6.0编写的COM DLL.目前,该DLL无法迁移到VS2005.我可以在DLL中设置断点并逐步执行,但问题是我看不到DLL中任何符号的值.

输出窗口显示已为DLL加载符号.调用堆栈正确显示了所有内容.

知道发生了什么吗?

I have a program written under VS2005 and have a COM DLL written under VC 6.0. At this time the DLL cannot be migrated to VS2005. I can set breakpoints in the DLL and step through it but the problem is that I cannot see the value of any symbols that are in the DLL.

The output window shows that symbols are loaded for the DLL. The call stack shows everything correctly.

Any idea what might be happening?

推荐答案

您好,SteveBacher,

I我们将猜测COM DLL是RET版本.大多数本地人可能已被优化.在这种情况下,调试时仔细检查会很有帮助.您应该能够看到正在使用哪个寄存器来存储值,例如如果是指针,则可以将其赋值到ecx等中.然后,您可以将该值存储在寄存器中,并通过强制转换为正确的类型(例如, (MyType *)ecx.

希望有帮助.

Azeem Khan
VS Debugger.
Hi SteveBacher,

I am going to guess that the COM DLL is a RET build. Most of the locals are probably optimized away. In this scenario looking at diasassmebly while debugging will help. You should be able to see which register is being used to store values e.g. this ptr in ecx etc. If it is a pointer then you can then take the value in the register and view it in Watch/QuickWatch windows by casting to the right type e.g. (MyType *)ecx.

Hope that helps.

Azeem Khan
VS Debugger.


这篇关于在VS2005(VC8.0)中进行调试,并尝试查看VC 6.0 DLL中的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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