Error using .ForEach in WinDbg

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

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

Below it is shown that the value is adrfilled just fine.

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

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

+5
source share
1 answer

You need to have spaces around adror use ${adr}. This is described on MSDN.

OutCommands, . - - , ${} (Alias โ€‹โ€‹Interpreter).

+5

All Articles