我正在尝试找出导致我们的应用程序使用WinDbg崩溃的代码。
我们在以下文件夹中为已编译的应用程序提供了.pdb符号:
E:\MyApplication
为了加载符号,我们将符号路径设置为:
E:\MyApplication;srv*E:\Symbols*https://msdl.microsoft.com/download/symbols;
这应该从E驱动器加载我们的本地pdb文件,然后所有其他符号将从符号服务器加载并缓存到E:\ Symbols文件夹。
但是,如果我设置!sym noisy
然后运行!analyze -v
:
SYMSRV: UNC:
e:\MyApplication\MyApplication.exe\5AB2A76A278000\MyApplication.exe - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.exe\5AB2A76A278000\MyApplication.ex_ - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.exe\5AB2A76A278000\file.ptr - path not found
SYMSRV: RESULT: 0x80070003
SYMSRV: BYINDEX: 0x1A
e:\symbols*https://msdl.microsoft.com/download/symbols
MyApplication.exe
5AB2A76A278000
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\MyApplication.exe - path not found
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\MyApplication.ex_ - path not found
SYMSRV: UNC: e:\symbols\MyApplication.exe\5AB2A76A278000\file.ptr - path not found
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/MyApplication.exe
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/MyApplication.ex_
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.exe/5AB2A76A278000/file.ptr
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: RESULT: 0x80190194
DBGHELP: C:\Program Files (x86)\Windows Kits\10\Debuggers\MyApplication.exe - file not found
DBGHELP: e:\MyApplication\MyApplication.exe - OK
DBGHELP: e:\MyApplication\MyApplication.exe found
DBGENG: Partial symbol load found image e:\MyApplication\MyApplication.exe.
SYMSRV: BYINDEX: 0x1B
e:\MyApplication
MyApplication.pdb
AC8AC5D12F6C47259920050B2F46CEF81
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pdb - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pd_ - path not found
SYMSRV: UNC: e:\MyApplication\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\file.ptr - path not found
SYMSRV: RESULT: 0x80070003
SYMSRV: BYINDEX: 0x1C
e:\symbols*https://msdl.microsoft.com/download/symbols
MyApplication.pdb
AC8AC5D12F6C47259920050B2F46CEF81
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pdb - path not found
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\MyApplication.pd_ - path not found
SYMSRV: UNC: e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81\file.ptr - path not found
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/MyApplication.pdb
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/MyApplication.pd_
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: HTTPGET: /download/symbols/MyApplication.pdb/AC8AC5D12F6C47259920050B2F46CEF81/file.ptr
SYMSRV: HttpQueryInfo: 80190194 - HTTP_STATUS_NOT_FOUND
SYMSRV: RESULT: 0x80190194
DBGHELP: MyApplication.pdb - file not found
DBGHELP: D:\Services\TEST_SET\BuildAgent\work\5862d9870f4438d8\source\MyApplication\obj\Release\MyApplication.pdb - file not found
*** WARNING: Unable to verify checksum for MyApplication.exe
*** ERROR: Module load completed but symbols could not be loaded for MyApplication.exe
E:\ MyApplication目录包含MyApplication.pdb文件。
然后运行分析是没用的,因为我们的应用程序中的方法名称是未知的,例如,如果我尝试检查崩溃的异常:
0:000> !PrintException /d 00000223b92c1f28
Exception object: 00000223b92c1f28
Exception type: System.Runtime.InteropServices.SEHException
Message: External component has thrown an exception.
InnerException: <none>
StackTrace (generated):
SP IP Function
000000BEE7BFD900 0000000000000000 MyApplication.Wpf.UserControls.dll!Unknown+0x1
000000BEE7BFD9B0 00007FF8AD7EAF10 System_Core_ni!System.Linq.Enumerable+WhereSelectListIterator`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]].MoveNext()+0x70
000000BEE7BFDA00 00007FF8549A7CF2 MyApplication.Util.Wpf.dll!Unknown+0x82
000000BEE7BFDA60 00007FF856EF9B02 MyApplication.Wpf.UserControls.dll!Unknown+0xc2
我错过了什么使符号正确加载?
答案 0 :(得分:0)
您可以在WinDbg查找的!sym noisy
日志中看到;如果所有其他方法都失败了,你可以把pdb放在搜索的正确位置。例如,创建此路径:
e:\symbols\MyApplication.pdb\AC8AC5D12F6C47259920050B2F46CEF81
然后将MyApplication.pdb复制到该文件夹中。
但是,正确的方法可能是了解symstore并使用它来构建本地符号服务器。