help with ptrace

Hi i was wondering if anyone could help me in using the ptrace in C. I have to fork a process. The child is going to execute another program and i have to trace the number of system calls and number of instructions that the other program issued. This has to be done with ptrace. I read the man pages but they weren't helpful at all. This has to work on any linux x86 machines. Do you know of any good tutorials or sample codes on how to use ptrace? Thanks a lot for any help.  
p.s. i have to finish this by tomorrow night, so i really need some help quickly if it's possible
pirol1983Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
pirol1983Author Commented:
the sample code looks very helpful, i'll try it in my program and i'll let you know ... Thank you
0
 
pirol1983Author Commented:
thanks for the quick help cookre. Everything worked fine.
0
 
cookreCommented:
glad it worked out...
0
All Courses

From novice to tech pro — start learning today.