开发者

gdb & finding out when a memory address is written to

开发者 https://www.devze.com 2023-01-04 13:15 出处:网络
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?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号