tags:

views:

51

answers:

2

I am trying to figure out when a certain memory address is written to. I have tried couple of different loops in gdb but it never stoped. Any ideas?

Ex:

(gdb) while *0x68181b88 == 0
> step
> end

PS: This is a mips linux system.

Edit: My MIPS does not have hw support/registers to watch memory values. Although watch works, it takes about 10 hours to run an application with a 5 sec lifetime. That is why I am trying the loops.

+1  A: 

watchpoint?

http://www.unknownroad.com/rtfm/gdbtut/gdbwatch.html

aaa
A: 

Use write watchpoint
Example:

(gdb) watch *0x68181b88

See gdb doc for details

ks1322