This pintool trace all the memory access operation and log regins(heap,stack,data section) of operands.
mv TraceMemoryAccess.cpp to pin-packet/source/tool/MyPinTool/TraceMemoryAccess.cpp
mkdir obj-ia32
make obj-ia32/TraceMemoryAccess.so TARGET=ia32
../../../pin -t obj-ia32/TraceMemoryAccess.so -- ./demoprogram
inst0:memory access ins code
memtrace0: memory access tag(heap, stack, global) of ins
maps0: address regin of heap, stack and global data
https://github.com/njuwangzhilong/TraceMemoryAccess/blob/master/results