我正在尝试使用 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 做些什么,将其转化为有意义的参考吗?