Lines Matching defs:tracee
356 pid_t tracee, tracer, wpid;
375 DPRINTF("Spawn tracee\n");
377 tracee = atf_utils_fork();
378 if (tracee == 0) {
385 CHILD_FROM_PARENT("exit tracee", parent_tracee, msg);
421 DPRINTF("Before calling PT_ATTACH from tracee %d\n", getpid());
422 FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);
424 /* Wait for tracee and assert that it was stopped w/ SIGSTOP */
426 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
433 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
443 /* Resume tracee with PT_CONTINUE */
444 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
446 /* Inform parent that tracer has attached to tracee */
449 /* Wait for parent to tell use that tracee should have exited */
450 CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg);
452 /* Wait for tracee and assert that it exited */
454 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
461 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
475 trackvforkdone ? "|PTRACE_VFORK_DONE" : "", tracee);
485 SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, tracee, &event, elen)
500 SYSCALL_REQUIRE(ptrace(PT_SET_SIGPASS, tracee, &set,
505 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
510 DPRINTF("Before calling %s() for the tracee %d\n", TWAIT_FNAME,
511 tracee);
512 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0),
513 tracee);
518 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
536 DPRINTF("Before calling %s() for the forkee %d of the tracee "
537 "%d\n", TWAIT_FNAME, tracee2, tracee);
559 ATF_REQUIRE_EQ(state.pe_other_pid, tracee);
566 DPRINTF("Before resuming the tracee process where it left off "
568 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
572 DPRINTF("Before calling %s() for the tracee %d\n", TWAIT_FNAME,
573 tracee);
575 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
580 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
587 DPRINTF("Before resuming the tracee process where it left off "
589 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
608 DPRINTF("Before calling %s() for the tracee - expected exited\n",
610 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
628 DPRINTF("Wait for the non-exited tracee process with %s()\n",
631 wpid = TWAIT_GENERIC(tracee, NULL, WNOHANG), 0);
633 DPRINTF("Wait for the tracer to attach to the tracee\n");
636 DPRINTF("Resume the tracee and let it crash\n");
637 PARENT_TO_CHILD("exit tracee", parent_tracee, msg);
639 DPRINTF("Resume the tracer and let it detect crashed tracee\n");
642 DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n",
644 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
937 pid_t tracee, tracer, wpid;
953 DPRINTF("Spawn tracee\n");
955 tracee = atf_utils_fork();
956 if (tracee == 0) {
958 CHILD_FROM_PARENT("exit tracee", parent_tracee, msg);
995 DPRINTF("Before calling PT_ATTACH from tracee %d\n", getpid());
996 FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);
998 /* Wait for tracee and assert that it was stopped w/ SIGSTOP */
1000 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1007 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
1017 /* Resume tracee with PT_CONTINUE */
1018 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
1020 /* Inform parent that tracer has attached to tracee */
1023 /* Wait for parent to tell use that tracee should have exited */
1024 CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg);
1026 /* Wait for tracee and assert that it exited */
1028 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1035 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
1045 DPRINTF("Set EVENT_MASK for the child %d\n", tracee);
1048 SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, tracee, &event, elen) != -1);
1052 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
1054 DPRINTF("Before calling %s() for the child %d\n", TWAIT_FNAME, tracee);
1055 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1060 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
1078 SYSCALL_REQUIRE(ptrace(op, tracee, (void *)1, 0) != -1);
1080 DPRINTF("Before calling %s() for the forkee %d of the tracee %d\n",
1081 TWAIT_FNAME, tracee2, tracee);
1096 ATF_REQUIRE_EQ(state.pe_other_pid, tracee);
1105 tracee);
1107 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1112 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
1122 SYSCALL_REQUIRE(ptrace(op, tracee, (void *)1, 0) != -1);
1138 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1157 DPRINTF("Wait for the non-exited tracee process with %s()\n",
1160 wpid = TWAIT_GENERIC(tracee, NULL, WNOHANG), 0);
1162 DPRINTF("Wait for the tracer to attach to the tracee\n");
1165 DPRINTF("Resume the tracee and let it crash\n");
1166 PARENT_TO_CHILD("exit tracee", parent_tracee, msg);
1168 DPRINTF("Resume the tracer and let it detect crashed tracee\n");
1171 DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n",
1173 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);