문제

I would like to set up a conditional breakpoint on an instruction that is like add [ebp+0xc], 1 but I can't figure out the right expression to give to gdb's shell.

I've tried that one yet it doesn't seem to work:

b *0xdeadbeef if ($ebp+0x0c) == 0xf00

But I think it only breaks when $ebp = 0xf0c (0xf00 + 0x0c) and this is not the intented result.

How could I perform a conditional breakpoint in that the memory location pointed by [ebp+0x0c] contains any specific value?

도움이 되었습니까?

해결책

Try

b *0xdeadbeef if *(int*)($ebp+0x0c) == 0xf00
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top