Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

how to write a loop in Windbg like this

By: a guest on Feb 19th, 2012  |  syntax: None  |  size: 0.25 KB  |  views: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. r @$t0=0;
  2.  
  3. $$ Loop to get all foo's
  4. .foreach (CurrentFoo {!dumpheap -type George.George2.Foo -short}){
  5.     $$ Increment # of Foo's
  6.     r @$t0 = @$t0+1
  7.  
  8.     .printf "Length:t%dn", poi(${CurrentFoo}+0xc);
  9. }
  10. .printf "Number of Foo's: %dnnnnnnnnn", @$t0;