2

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

慕冬亮
  • 339
  • 1
  • 2
  • 10

1 Answers1

1

the libc function system() is not yet implemented in PinCRT. Please use popen() (which is implemented) instead.

source.

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
慕冬亮
  • 339
  • 1
  • 2
  • 10