I need a log of all the memory locations a C program modifies during its execution. The problem is a bit more involved than watching a region of memory using gdb/valgrind, because I do not have the start or end addresses for the memory region. Basically, whenever and wherever the program does a memory update (in the form of a push, move to a memory operand, etc), I need that memory address as well as the value written at that address.
Does anyone have any suggestions or advice?
Thanks!
You can monitor memory stores, reads, contents of registers, etc. with Pin, a tool created by Intel. Here is a project from MIT that simulates a processor cache (instruction and/or data). Pin is used to create a detailed instruction trace, and the trace is then used as input to the cache simulator.