我仍在使用相同的脚本,我在this other StackOverflow post中提到过 总体思路:
这次dt
函数似乎在CMap对象上失败了:
dt <application_name>!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64> m_nCount 000000eab8748430
Ambiguous matches found for <application_name>!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64> (dumping largest sized):
<application_name>!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>::~CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>
<application_name>!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>::CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64> {0x02b bytes}
为了解决这个问题,我试图在Visual Studio观察窗口中打开该对象,但无论我尝试什么,这似乎都失败了:
(CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>)0x000000eab8748430 => identifier "CMap..." is undefined
(CMap)0x000000eab8748430 => identifier "CMap" is undefined
(<application_name>!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>)0x000000eab8748430 => identifier "<application_name>" is undefined
(mfc110u!CMap<int,int,CUIntArray * __ptr64,CUIntArray * __ptr64>)0x000000eab8748430 => identifier "mfc110u" is undefined
...
然而,这种工作方式似乎适用于其他STL类,如CStringArray
:
(CStringArray*)0x000000eab87c6d10 => this is giving good results
有人知道我如何根据其内存地址在Visual Studio的监视窗口中显示CMap(或CArray)对象吗?
答案 0 :(得分:0)
似乎调试器在CMap定义方面存在问题,并且通过从类型定义中删除__ptr64
条目(请注意__ptr64
开头的空格),我可以看到变量:
(CMap<int,int,CUIntArray *,CUIntArray *>*) 0x000000eab8748430
我相信调试器中存在一个错误: - )