当寄存器的值为0xffaa时,gdb:断点 [英] gdb: breakpoint when register will have value 0xffaa
本文介绍了当寄存器的值为0xffaa时,gdb:断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在$ eax的值为0x0000ffaa时打破这个断点/ watchpoint / smth else在gdb中的值。
是否可以使用gdb或dbx或任何其他的unix调试器?
解决方案
观看$ eax == 0x0000ffaa
在gdb中,您可以设置一个观察点: code>
但它依赖于可用于目标的监视点支持。您应该注意,这可能会显着减缓执行 。
如果您想在某个位置休息,可以通过设置一个条件断点:$ b
$ b
break test.c:120 if $ eax == 0x0000ffaa
Can I set the breakpoint/watchpoint/smth else in gdb for register value?
I want to break when $eax will have value 0x0000ffaa.
Is it possible with gdb or dbx or any other unix debugger?
解决方案
Yes in gdb you would set a watchpoint like so:
watch $eax == 0x0000ffaa
But it is dependent on watchpoint support being available for the target. You should note that this may slow down execution significantly.
If you would like to break in a certain location you can do so, by setting a conditional breakpoint:
break test.c:120 if $eax == 0x0000ffaa
这篇关于当寄存器的值为0xffaa时,gdb:断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文