backtrace_test.cpp | 103 static void WaitForStop(pid_t pid) { 107 while (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) < 0 && (errno == EINTR || errno == ESRCH)) { 116 static void CreateRemoteProcess(pid_t* pid) { 117 if ((*pid = fork()) == 0) { 122 ASSERT_NE(-1, *pid); 124 ASSERT_TRUE(ptrace(PTRACE_ATTACH, *pid, 0, 0) == 0); 127 WaitForStop(*pid); 130 static void FinishRemoteProcess(pid_t pid) { 131 ASSERT_TRUE(ptrace(PTRACE_DETACH, pid, 0, 0) == 0); 133 kill(pid, SIGKILL) 134 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); local 347 pid_t pid; local 356 ASSERT_EQ(waitpid(pid, &status, 0), pid); local 360 pid_t pid; local 370 ASSERT_EQ(waitpid(pid, &status, 0), pid); local 374 pid_t pid; local 383 ASSERT_EQ(waitpid(pid, &status, 0), pid); local 401 pid_t pid; local 410 ASSERT_EQ(waitpid(pid, &status, 0), pid); local 437 pid_t pid; local 916 pid_t pid; local 1066 pid_t pid; local 1107 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); local 1212 pid_t pid; local 1283 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); local 1362 pid_t pid; local 1400 ASSERT_EQ(waitpid(pid, nullptr, 0), pid); local 1425 pid_t pid; local 1587 pid_t pid; local 1638 pid_t pid; local [all...] |