Home | History | Annotate | Download | only in src

Lines Matching defs:tracer

49 pid_t tracer, tracee;
55 ret = prctl (PR_SET_PTRACER, tracer, 0, 0, 0);
70 tracer = getpid();
71 printf("tracer %d waiting\n", tracer);
74 printf("forking tracee from tracer\n");
84 perror("tracer pipe read");
88 printf("tracer to PTRACE_ATTACH my tracee %d\n", tracee);
92 perror ("tracer ptrace attach has failed");
95 printf ("tracer ptrace attach successful\n");
98 printf("tracer waiting for tracee to SIGSTOP\n");
101 printf("tracer to PTRACE_CONT tracee\n");
105 perror ("tracer ptrace continue has failed");
108 printf ("tracer ptrace continue successful\n");
110 printf("tracer returning 0\n");
117 /* Tracee knows nothing, needs tracee and tracer pid. */
126 printf("tracee %d reading tracer pid\n", tracee);
134 tracer = atoi(buf);
136 printf("tracee %d started (expecting %d as tracer)\n", tracee, tracer);
141 ret = prctl (PR_SET_PTRACER, tracer, 0, 0, 0);
155 printf("tracee triggering tracer\n");
181 /* Tracer knows tracee, needs tracer pid. */
189 * 0: tracer forks tracee.
209 printf("will fork tracee from tracer\n");
211 printf("will issue ptrace from tracer %s\n",
231 tracer = fork();
232 if (tracer < 0) {
233 perror("fork tracer");
236 if (tracer == 0) {
237 printf("tracer is %d\n", getpid());
249 /* Leave the pipes for the tracee and tracer. */
255 sprintf(buf, "%d", tracer);
258 printf("master waiting for tracer to finish\n");
260 waitpid(tracer, &status, 0);
269 printf("master saw rc %d from tracer\n", status);