2

我有一个内存转储。我可以得到正常的调用堆栈(带行号)当我使用调试诊断分析转储时,我在线程 62 上得到了这个调用堆栈。

.NET Call Stack

[[HelperMethodFrame_1OBJ] (System.Threading.WaitHandle.WaitOneNative)] System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean) 
mscorlib_ni!System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle, Int64, Boolean, Boolean)+21 
mscorlib_ni!System.Threading.WaitHandle.WaitOne(Int32, Boolean)+31 
CaptureServices.GenericInfrastructure.ExportLogic.ChannelsThread.ChannelsStateThread()+bb 
mscorlib_ni!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+15e 
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)+17 
mscorlib_ni!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)+52 
mscorlib_ni!System.Threading.ThreadHelper.ThreadStart()+52 
[[GCFrame]] 
[[DebuggerU2MCatchHandlerFrame]] 

据我了解.NET 有一些机制来显示人类可读的名称而不是地址。现在我想要 WinDbg 中的这一行:

CaptureUtilities.AudioProcessing.APProcessorThread.IterateAPStreamProcessorQueue()+49 

我打开 WinDbg 并加载转储。我执行~62 k并得到

Child-SP          RetAddr           Call Site
00000016`4965e0c8 00007ffc`b59113ed ntdll!NtWaitForMultipleObjects+0xa
00000016`4965e0d0 00007ffc`abde77be KERNELBASE!WaitForMultipleObjectsEx+0xe1
00000016`4965e3b0 00007ffc`abde7658 clr!WaitForMultipleObjectsEx_SO_TOLERANT+0x62
00000016`4965e410 00007ffc`abde7451 clr!Thread::DoAppropriateWaitWorker+0x1e4
00000016`4965e510 00007ffc`abdebd15 clr!Thread::DoAppropriateWait+0x7d
00000016`4965e590 00007ffc`a94ecdf1 clr!WaitHandleNative::CorWaitOneNative+0x165
00000016`4965e7c0 00007ffc`a94ecdc1 mscorlib_ni+0x48cdf1
00000016`4965e7f0 00007ffc`4cf2e97b mscorlib_ni+0x48cdc1
00000016`4965e830 00007ffc`a94e674e 0x00007ffc`4cf2e97b
00000016`4965e890 00007ffc`a94e65e7 mscorlib_ni+0x48674e
00000016`4965e960 00007ffc`a94e65a2 mscorlib_ni+0x4865e7
00000016`4965e990 00007ffc`a94ed1f2 mscorlib_ni+0x4865a2
00000016`4965e9e0 00007ffc`abc36a53 mscorlib_ni+0x48d1f2
00000016`4965ea20 00007ffc`abc36913 clr!CallDescrWorkerInternal+0x83

好的,据我了解是一样的。现在我们有

0x00007ffc`4cf2e97b

代替

CaptureServices.GenericInfrastructure.ExportLogic.ChannelsThread.ChannelsStateThread()+bb 

所以我有微软调试符号,现在我需要加载我自己的符号来查看调用堆栈。问题是 - 我需要为我的项目加载所有调试符号还是只需要包含 dll 的调试符号CaptureServices.GenericInfrastructure.ExportLogic?或者也许我只需要加载我的调试符号的一部分来处理这个线程?

4

3 回答 3

1

试试!sosex.mk。它提供了一个用户友好的堆栈跟踪,其中包含交错的托管帧和本机帧。我不认为这是一个象征问题。此外,当您拥有托管地址时,您可以将其传递给以!sosex.mln查看其中的内容,但我认为您已经知道此命令。

于 2017-03-15T20:23:04.713 回答
0

中的k命令~62k是本机调用堆栈的命令。它确实显示了任何 .NET 的东西(除了 .NET 中的本机方法clr.dll)。

要查看 .NET 堆栈,您需要为 WinDbg 加载 .NET 扩展:

.loadby sos clr

然后使用该扩展的命令查看 .NET 调用堆栈。先切换到线程 62

~62s
!clrstack
!dumpstack

恕我直言,这些命令将在需要时从 PDB 加载符号。如果您收到符号警告,请参阅如何在 WinDbg 中修复符号

于 2017-03-15T17:00:59.187 回答
-1

您需要该函数所属的任何库的调试符号。

于 2017-03-14T17:57:18.370 回答