Windbg pseudoregister expansion
- by Giuseppe Guerrini
Hi,
I am trying to automate a device driver's debug session in Windows XP with Windbg. My device has an "index" register and a "data" register, both memory mapped. The index register must be filled with the internal register's index, and the value can be read from the data register.
So, the followind Windbg command prints correctly the value of the internel register 0x4C:
!ed [uc] 0xfa000000 0x4c; !dd [uc] 0xfa000004 L1
Now I would like to dump a range of internal registers, but it seems that the alias expansion doesn't work as expected in the !ed command. I am trying this cycle:
.for (r $t0=0; @$t0<0x100; r $t0=@$t0+1) { !ed [uc] 0xfa000000 @$t0; !dd [uc] 0xfa000004 L1 }
but it seems that the !ed command is ignored, as if @$t0 was expanded in an empty string.
Tried "$t0", "@$t0", "${t0}" and "@${t0}", but without success. What am I doing wrong?
Thank you in advance