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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With