Lines Matching refs:tracee

357 	pid_t tracee, tracer, wpid;
376 DPRINTF("Spawn tracee\n");
378 tracee = atf_utils_fork();
379 if (tracee == 0) {
386 CHILD_FROM_PARENT("exit tracee", parent_tracee, msg);
422 DPRINTF("Before calling PT_ATTACH from tracee %d\n", getpid());
423 FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);
425 /* Wait for tracee and assert that it was stopped w/ SIGSTOP */
427 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
434 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
444 /* Resume tracee with PT_CONTINUE */
445 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
447 /* Inform parent that tracer has attached to tracee */
450 /* Wait for parent to tell use that tracee should have exited */
451 CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg);
453 /* Wait for tracee and assert that it exited */
455 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
462 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
476 trackvforkdone ? "|PTRACE_VFORK_DONE" : "", tracee);
486 SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, tracee, &event, elen)
501 SYSCALL_REQUIRE(ptrace(PT_SET_SIGPASS, tracee, &set,
506 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
511 DPRINTF("Before calling %s() for the tracee %d\n", TWAIT_FNAME,
512 tracee);
513 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0),
514 tracee);
519 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
537 DPRINTF("Before calling %s() for the forkee %d of the tracee "
538 "%d\n", TWAIT_FNAME, tracee2, tracee);
560 ATF_REQUIRE_EQ(state.pe_other_pid, tracee);
567 DPRINTF("Before resuming the tracee process where it left off "
569 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
573 DPRINTF("Before calling %s() for the tracee %d\n", TWAIT_FNAME,
574 tracee);
576 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
581 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
588 DPRINTF("Before resuming the tracee process where it left off "
590 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
610 DPRINTF("Before calling %s() for the tracee - expected exited\n",
612 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
630 DPRINTF("Wait for the non-exited tracee process with %s()\n",
633 wpid = TWAIT_GENERIC(tracee, NULL, WNOHANG), 0);
635 DPRINTF("Wait for the tracer to attach to the tracee\n");
638 DPRINTF("Resume the tracee and let it crash\n");
639 PARENT_TO_CHILD("exit tracee", parent_tracee, msg);
641 DPRINTF("Resume the tracer and let it detect crashed tracee\n");
644 DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n",
646 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
939 pid_t tracee, tracer, wpid;
955 DPRINTF("Spawn tracee\n");
957 tracee = atf_utils_fork();
958 if (tracee == 0) {
960 CHILD_FROM_PARENT("exit tracee", parent_tracee, msg);
997 DPRINTF("Before calling PT_ATTACH from tracee %d\n", getpid());
998 FORKEE_ASSERT(ptrace(PT_ATTACH, tracee, NULL, 0) != -1);
1000 /* Wait for tracee and assert that it was stopped w/ SIGSTOP */
1002 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1009 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
1019 /* Resume tracee with PT_CONTINUE */
1020 FORKEE_ASSERT(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
1022 /* Inform parent that tracer has attached to tracee */
1025 /* Wait for parent to tell use that tracee should have exited */
1026 CHILD_FROM_PARENT("wait for tracee exit", parent_tracer, msg);
1028 /* Wait for tracee and assert that it exited */
1030 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1037 ptrace(PT_GET_SIGINFO, tracee, &info, sizeof(info)) != -1);
1047 DPRINTF("Set EVENT_MASK for the child %d\n", tracee);
1050 SYSCALL_REQUIRE(ptrace(PT_SET_EVENT_MASK, tracee, &event, elen) != -1);
1054 SYSCALL_REQUIRE(ptrace(PT_CONTINUE, tracee, (void *)1, 0) != -1);
1056 DPRINTF("Before calling %s() for the child %d\n", TWAIT_FNAME, tracee);
1057 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1062 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
1080 SYSCALL_REQUIRE(ptrace(op, tracee, (void *)1, 0) != -1);
1082 DPRINTF("Before calling %s() for the forkee %d of the tracee %d\n",
1083 TWAIT_FNAME, tracee2, tracee);
1098 ATF_REQUIRE_EQ(state.pe_other_pid, tracee);
1107 tracee);
1109 wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1114 ptrace(PT_GET_PROCESS_STATE, tracee, &state, slen) != -1);
1124 SYSCALL_REQUIRE(ptrace(op, tracee, (void *)1, 0) != -1);
1140 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);
1159 DPRINTF("Wait for the non-exited tracee process with %s()\n",
1162 wpid = TWAIT_GENERIC(tracee, NULL, WNOHANG), 0);
1164 DPRINTF("Wait for the tracer to attach to the tracee\n");
1167 DPRINTF("Resume the tracee and let it crash\n");
1168 PARENT_TO_CHILD("exit tracee", parent_tracee, msg);
1170 DPRINTF("Resume the tracer and let it detect crashed tracee\n");
1173 DPRINTF("Wait for tracee to finish its job and exit - calling %s()\n",
1175 TWAIT_REQUIRE_SUCCESS(wpid = TWAIT_GENERIC(tracee, &status, 0), tracee);