当到达地址(ba)断点的中断点时检查windbg中的数据 [英] Examine data in windbg when a break on address (ba) breakpoint is hit
问题描述
我想创建一个断点,以便它将创建另一个一次性断点,该断点将在写入该内存时 dd该内存地址。
I'd like to create a breakpoint such that it will create another one-time breakpoint that will 'dd' a certain memory address when that memory is written to.
所以当遇到断点时,我想运行一个命令,例如:
So when the breakpoint is hit, I'd like to run a command like:
ba w4 @ESP+4 /1 ''dd [memory address of this breakpoint]''
由于此断点是由另一个断点创建的断点(可能会多次调用),我无法指定断点号。否则,我可以使用类似'$ bp3'的伪寄存器来获取断点#3的内存地址
Since this breakpoint is being created by another breakpoint (and could potentially be called several times), I can't specify the breakpoint number. Otherwise I could use a pseudo register like '$bp3' to get the memory address of breakpoint #3
有人会对如何创建一个断点命令有任何想法吗?
Would anyone have any thoughts on how to create a breakpoint command that can 'dd' the memory address of the breakpoint?
谢谢!
推荐答案
您可以详细说明如何使用其他通用伪寄存器:t0..t19
you can elaborate to make use of other general purpose pseudo-registers: t0..t19
bp your-address "r$t1=your-other-address; ba w4 @$t1 /1 \"dd @$t1;gc\""
这篇关于当到达地址(ba)断点的中断点时检查windbg中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!