I wrote a PIN tool that can inject some code before and after a certain function in a binary image. It is working for a single binary image.
Now , my objective is to instrument Xserver in Linux with that tool. I tried to instrument "startx" by the PIN tool and it did not work. Later, I found that startx is only a shell script that runs other commands.
What steps I need to follow if I want to instrument xserver using PIN? Is it possible to instrument a shell script somehow using PIN?