l.thee.a
l.thee.a

Reputation: 3351

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 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.

Upvotes: 3

Views: 641

Answers (2)

ks1322
ks1322

Reputation: 35845

Use write watchpoint
Example:

(gdb) watch *0x68181b88

See gdb doc for details

Upvotes: 1

Anycorn
Anycorn

Reputation: 51565

watchpoint?

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

Upvotes: 1

Related Questions