gdb & finding out when a memory address is written to
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 val开发者_StackOverflow社区ues. 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.
Use write watchpoint
Example:
(gdb) watch *0x68181b88
See gdb doc for details
watchpoint?
http://www.unknownroad.com/rtfm/gdbtut/gdbwatch.html
精彩评论