在windbg时要注意sos.dll的版本

前段时间项目遇到一些问题,抓了一个dump后拿回家里的机器上分析。按着方法一步一步走,走到!clrstack的时候,问题出现了——看不到托管环境下的method name。我觉得这这!clrstack看不到method name可真没什么作用了。随后请教了几个朋友,都说没碰到过着情况。

第二天去了公司先打开windbg,open这个dump,载入sos后先来一个~*e!clrstack。邪门,method name都出来了。

从操作系统,windbg版本,symbols等几个方面都下手分析了一下,未果。问人吧,问了一圈都没有解决。问了熊力,他说他可以看到,说明问题肯定不奇怪,而且肯定是某个细节的问题。挂虚拟机,测之,问题依旧,大悦,终于出问题了。

后来我把我公司机器上的sos和家里机器的sos拿过来比较,大小不一样,用!eeversion来看,版本号确实不一样。问题解决——选用合适的版本!

但是为什么出现这种情况呢?

发了email问tess,可惜的是tess大姐渡假期去了,但是庆幸的是Tom假期结束,也给了回复:

So the problem here is that we do not guarantee that newer versions of SOS will be able to debug older versions of CLR.  You must match the version of SOS to the version of the runtime (unless we are explicitly giving them private bits for SOS to fix a bug in it).  From the output below, !eeversion is telling you that the one that won’t walk the stack does not match the runtime’s version.  This is why it won’t walk the stack.
We always try to make SOS backwards compatible, but it’s not something we guarantee.

估计知道这个事情的人不多,特此分享。如遇雷同,麻烦留言谢过后立刻能解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值