在 WinDbg 中使用 .ForEach 时出错 [英] Error while using .ForEach in WinDbg

查看:42
本文介绍了在 WinDbg 中使用 .ForEach 时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我在调试转储文件时在 WinDbg 中运行以下命令时会收到 Invalid parameter poi(adr+4)?

Why am I getting a Invalid parameter poi(adr+4) when I run the following command in WinDbg while debugging a dump file?

.foreach ( adr { !dumpheap -mt 66df13d4 -short } ) { !do poi(adr+4); }

以下显示 adr 的值填充得很好.

The following shows that the value of adr is getting populated just fine.

.foreach ( adr { !dumpheap -mt 66df13d4 -short } ) { .echo adr; }

我想获取存储在 System.Web.Caching.CacheEntry 对象的第 4 个偏移处的 .NET 字符串变量的内容.

I want to get the contents of a .NET string variable that is stored at the 4th offset of a System.Web.Caching.CacheEntry object.

推荐答案

adr 周围需要有空格或使用 ${adr}.这在 MSDN

You need to have spaces around adr or use ${adr}. This is documented in MSDN

注意 当字符串 Variable 出现在 OutCommands 中时,它必须是被空间包围.如果它与任何其他文本相邻——即使是括号——它不会被当前的令牌值替换,除非您使用 ${ }(别名解释器) 令牌.

Note When the string Variable appears within OutCommands, it must be surrounded by spaces. If it is adjacent to any other text -- even a parenthesis -- it will not be replaced by the current token value, unless you use the ${ } (Alias Interpreter) token.

这篇关于在 WinDbg 中使用 .ForEach 时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆