Gdb and figuring out when the memory address is written to

I am trying to figure out when a specific memory address is being written. I tried a couple of different loops in gdb, but it never stopped. Any ideas?

Example:

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

PS: This is a Linux mips system.

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

+3
source share
2 answers

Use an observation point Example:

(gdb) watch *0x68181b88

See gdb doc for details

+1
source

Source: https://habr.com/ru/post/1751695/


All Articles