WinDbg !heap 命令由于缺少符号而无法工作
我正在尝试使用 WinDbg 调试带有 C++ 非托管内存分配的 .NET 应用程序。
当我尝试运行 !heap 命令时,收到以下错误消息:
0:022> !heap
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\KERNEL32.dll -
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: ntdll!_HEAP_ENTRY ***
*** ***
*************************************************************************
Invalid type information
如何修复此错误?
I am trying to use WinDbg debug my .NET application with C++ unmanaged memory allocations.
When I try to run the !heap command, I get the following error message:
0:022> !heap
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\KERNEL32.dll -
*************************************************************************
*** ***
*** ***
*** Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: ntdll!_HEAP_ENTRY ***
*** ***
*************************************************************************
Invalid type information
How can I fix this error?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用以下命令修复符号路径:
Use the following commands to fix your symbol path:
配置符号服务器。请按照以下步骤操作:
有关详细信息,请参阅此处。
Configure a symbol server. Follow there steps:
See here for more details.
您需要为您的应用程序设置符号,并使其指向 Windows 符号服务器。对于 Windows 符号服务器,您可以按照 Steve 所说的操作。
"SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols"
之后,设置 !sym 噪音,这将以详细模式加载符号。
执行 .reload ,这可以让您知道需要但未找到哪些符号。
如果您已经知道应用程序的 pdb 位置,请使符号路径指向该位置,然后重复上述步骤以确保加载所有必需的符号。
You need to set the symbols for your application and also have it point to windows symbol server. For windows symbol server you can do what Steve says.
"SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols"
After that, set !sym noisy which will do symbol loading in verbose mode.
Do .reload and this lets you know which symbols are needed but not found.
If you already know the location of pdbs for your application make the symbol path point to that and repeat the steps above to make sure all required symbols are loaaded.