I want to execute one shell command (gcore $pid
) at the end of pin tool.
In order to complete this goal, I try to modify the itrace pin tool and do one simple shell command first. I add one statement system("ls > /tmp/test")
at the starting of Fini function. Then compile the pin tool again.
Run the pin tool - itrace:
../../../pin -t obj-intel64/itrace.so -- /bin/ls
But there does not exist file - "/tmp/test".