Pergunta

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?

Foi útil?

Solução

Try

b *0xdeadbeef if *(int*)($ebp+0x0c) == 0xf00
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top