如何从托管代码获取本机调用堆栈?

时间:2015-07-09 21:52:36

标签: windbg

我正在尝试在64位Windows 8.1 Pro上调试托管的Win32应用程序。我加载了SOS .cordll -ve -u -l.loadby SOS clr,并将符号路径设置为Microsoft的公共服务器。

我可以获得CLR调用堆栈但是当我尝试获取托管调用堆栈(K 10)时,我得到以下内容。想知道我错过了什么。

00f8c23c 6c11777c PresentationCore_ni+0x1b76f0
00f8c2a8 6c114c57 PresentationCore_ni+0x1b777c
00f8c32c 6c1148af PresentationCore_ni+0x1b4c57
00f8c384 6c113926 PresentationCore_ni+0x1b48af
00f8c41c 6c1132e7 PresentationCore_ni+0x1b3926
00f8c440 6c11324f PresentationCore_ni+0x1b32e7
00f8c464 6b0b65da PresentationCore_ni+0x1b324f
00f8c4a0 6b0b6426 PresentationFramework_ni+0x3465da
00f8c52c 6b0b5ec6 PresentationFramework_ni+0x346426
00f8c57c 6b049bfc PresentationFramework_ni+0x345ec6
00f8c778 6c10e0ec PresentationFramework_ni+0x2d9bfc
00f8c7f4 6b054f45 PresentationCore_ni+0x1ae0ec
00f8c814 6b05a211 PresentationFramework_ni+0x2e4f45
00f8c870 6b049bfc PresentationFramework_ni+0x2ea211
00f8ca6c 6c10e0ec PresentationFramework_ni+0x2d9bfc

1 个答案:

答案 0 :(得分:3)

您似乎混淆了本机调用堆栈和托管(CLR)调用堆栈。

  • k为您提供本机调用堆栈。
  • !clrstack(SOS)为您提供托管调用堆栈。
  • !dumpstack(SOS)同时为您提供。
  • !mk SOSEX也为您提供了两种,但方式更好。
相关问题