Windbg 伪寄存器扩展
我正在尝试使用 Windbg 在 Windows XP 中自动执行设备驱动程序的调试会话。我的设备有一个“索引”寄存器和一个“数据”寄存器,两者都映射到内存。索引寄存器必须填充内部寄存器的索引,并且可以从数据寄存器读取值。 因此,以下 Windbg 命令正确打印内部寄存器 0x4C 的值:
!ed [uc] 0xfa000000 0x4c; !dd [uc] 0xfa000004 L1
现在我想转储一系列内部寄存器,但似乎别名扩展在 !ed 命令中无法按预期工作。我正在尝试这个循环:
.for (r $t0=0; @$t0<0x100; r $t0=@$t0+1) { !ed [uc] 0xfa000000 @$t0; !dd [uc] 0xfa000004 L1 }
但似乎 !ed 命令被忽略,就好像 @$t0 在空字符串中扩展一样。 尝试了“$t0”、“@$t0”、“${t0}”和“@${t0}”,但没有成功。我做错了什么?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,看起来 !ed 不像其他命令那样评估它的参数。您需要事先评估它们,例如使用别名,如下所示:
Yes it seems !ed does not evaluate its arguments like other commands. You need to evaluate them beforehand, for instance with an alias, like this: