我正在尝试使用UMDH调试内存泄漏。但它永远不会成功加载符号。我很确定我的设置正确 -
C:\Documents and Settings\Administrator>set _
_NT_SYMBOL_PATH=SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols;E:\mysymbols
C:\Documents and Settings\Administrator>dir e:\mysymbols
Volume in drive E is DataApps
Volume Serial Number is F6F5-37AE
Directory of e:\mysymbols
11/08/2012 03:20 PM <DIR> .
11/08/2012 03:20 PM <DIR> ..
11/08/2012 10:02 AM 2,630,656 Gen2EAPI.pdb
11/08/2012 10:07 AM 4,555,776 ObjectCommunicator.pdb
11/08/2012 10:01 AM 2,475,008 ObjSrvCommAPI.pdb
11/08/2012 10:02 AM 3,761,152 ScpmAPI.pdb
4 File(s) 13,422,592 bytes
2 Dir(s) 803,125,231,616 bytes free
但是UMDH拒绝加载ObjectCommunicator.exe的符号:
// Debug library initialized ...
DBGHELP: ObjectCommunicator - no symbols loaded
DBGHELP: ntdll - public symbols
C:\Symbols\ntdll.pdb\F7024C7F15FE4BEA992FF38BE58AC11C2\ntdll.pdb
ObjectCommunicator.exe是使用这些选项构建的(使用vc 6.0。是的 - 它已经过时了,但升级不是一个选项):
/nologo /MD /W3 /GR /GX /Zi /Od /I "..\Scpm Api" /I "..\ScpmImpl" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D MODULE_NAME=\"ObjectCommunicator\" /Fp"Release/ObjectCommunicator.pch" /Yu"stdafx.h" /Fo"Release/" /Fd"Release/" /FD /c
与这些选项相关联(减去一些.libs):
/nologo /subsystem:windows /incremental:no /pdb:"..\Bin\Release/ObjectCommunicator.pdb" /debug /machine:I386 /out:"..\Bin\Release/ObjectCommunicator.exe" /IGNORE:4089
为什么UMDH无法加载我的符号?有没有办法调试?如果没有,有没有办法解释这样的UMDH堆栈跟踪:
+ 42432 ( 45424 - 2992) 167 allocs BackTraceAEB
+ 156 ( 167 - 11) BackTraceAEB allocations
ntdll!RtlAllocateHeapSlowly+41
ntdll!RtlAllocateHeap+E9F
msvcrt!malloc+6C
MFC42!operator new+15
ObjectCommunicator!???+0 : 402F71
ObjectCommunicator!???+0 : 43D6AC
ObjectCommunicator!???+0 : 43C523
ObjectCommunicator!???+0 : 43C3E4
MFC42!_AfxThreadEntry+FB
msvcrt!_endthreadex+A3
kernel32!BaseThreadStart+34
特别是,“ObjectCommunicator!??? + 0:43C3E4”是什么意思?我可以对CDB做些什么,例如,把它变成有意义的参考吗?
答案 0 :(得分:1)
事实证明,我只需要真正安装调试工具。 &#34;高级Windows调试&#34;声称可以通过副本安装这些工具,但这似乎不适用于UMDH。使用官方安装程序安装后,我能够让UMDH看到符号。