Lines Matching defs:tracee
432 pid_t tracee, tracer, wpid;
444 DPRINTF("Spawn tracee\n");
447 tracee = atf_utils_fork();
448 if (tracee == 0) {
450 CHILD_TO_PARENT("tracee ready", parent_tracee, msg);
459 CHILD_TO_PARENT("tracee exit", parent_tracee, msg);
467 PARENT_FROM_CHILD("tracee ready", parent_tracee, msg);
473 DPRINTF("Before calling PT_ATTACH from tracee %d\n", getpid());
474 FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);
476 /* Wait for tracee and assert that it was stopped w/ SIGSTOP */
478 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
483 "tracee");
485 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
497 FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &lwp, sizeof(lwp))
508 "tracee\n");
509 FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &lwp, sizeof(lwp))
513 "tracee\n");
516 /* Resume tracee with PT_CONTINUE */
517 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
519 /* Inform parent that tracer has attached to tracee */
525 /* Wait for tracee and assert that it raised a signal */
527 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
534 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
550 FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &lwp,
564 "tracee\n");
565 FORKEE_ASSERT(ptrace(PT_LWPINFO, tracee, &lwp, sizeof(lwp))
574 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, SIGKILL)
577 /* Wait for tracee and assert that it exited */
579 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
587 DPRINTF("Wait for the tracer to attach to the tracee\n");
590 DPRINTF("Resume the tracee and spawn threads\n");
593 DPRINTF("Resume the tracee and let it exit\n");
594 PARENT_FROM_CHILD("tracee exit", parent_tracee, msg);
606 DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n",
608 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, WNOHANG),
609 tracee);