• Home
  • Raw
  • Download

Lines Matching refs:pid

136 static void VerifyUnwind(pid_t pid, Maps* maps, Regs* regs,  in VerifyUnwind()  argument
138 auto process_memory(Memory::CreateProcessMemory(pid)); in VerifyUnwind()
229 void WaitForRemote(pid_t pid, uint64_t addr, bool leave_attached, bool* completed) { in WaitForRemote() argument
235 if (ptrace(PTRACE_ATTACH, pid, 0, 0) == 0) { in WaitForRemote()
236 ASSERT_TRUE(TestQuiescePid(pid)) in WaitForRemote()
239 MemoryRemote memory(pid); in WaitForRemote()
246 ASSERT_EQ(0, ptrace(PTRACE_DETACH, pid, 0, 0)); in WaitForRemote()
259 pid_t pid; in TEST_F() local
260 if ((pid = fork()) == 0) { in TEST_F()
264 ASSERT_NE(-1, pid); in TEST_F()
265 TestScopedPidReaper reap(pid); in TEST_F()
268 WaitForRemote(pid, reinterpret_cast<uint64_t>(&g_ready_for_remote), true, &completed); in TEST_F()
271 RemoteMaps maps(pid); in TEST_F()
273 std::unique_ptr<Regs> regs(Regs::RemoteGet(pid)); in TEST_F()
276 VerifyUnwind(pid, &maps, regs.get(), kFunctionOrder); in TEST_F()
278 ASSERT_EQ(0, ptrace(PTRACE_DETACH, pid, 0, 0)) in TEST_F()
283 pid_t pid; in TEST_F() local
284 if ((pid = fork()) == 0) { in TEST_F()
288 ASSERT_NE(-1, pid); in TEST_F()
289 TestScopedPidReaper reap(pid); in TEST_F()
292 WaitForRemote(pid, reinterpret_cast<uint64_t>(&g_ready_for_remote), true, &completed); in TEST_F()
295 std::unique_ptr<Regs> regs(Regs::RemoteGet(pid)); in TEST_F()
298 UnwinderFromPid unwinder(512, pid); in TEST_F()
305 ASSERT_EQ(0, ptrace(PTRACE_DETACH, pid, 0, 0)) in TEST_F()
310 pid_t pid; in RemoteCheckForLeaks() local
311 if ((pid = fork()) == 0) { in RemoteCheckForLeaks()
315 ASSERT_NE(-1, pid); in RemoteCheckForLeaks()
316 TestScopedPidReaper reap(pid); in RemoteCheckForLeaks()
319 WaitForRemote(pid, reinterpret_cast<uint64_t>(&g_ready_for_remote), true, &completed); in RemoteCheckForLeaks()
322 TestCheckForLeaks(unwind_func, &pid); in RemoteCheckForLeaks()
324 ASSERT_EQ(0, ptrace(PTRACE_DETACH, pid, 0, 0)) in RemoteCheckForLeaks()
329 pid_t* pid = reinterpret_cast<pid_t*>(data); in RemoteUnwind() local
331 RemoteMaps maps(*pid); in RemoteUnwind()
333 std::unique_ptr<Regs> regs(Regs::RemoteGet(*pid)); in RemoteUnwind()
336 VerifyUnwind(*pid, &maps, regs.get(), kFunctionOrder); in RemoteUnwind()
344 pid_t* pid = reinterpret_cast<pid_t*>(data); in RemoteUnwindFromPid() local
346 std::unique_ptr<Regs> regs(Regs::RemoteGet(*pid)); in RemoteUnwindFromPid()
349 UnwinderFromPid unwinder(512, *pid); in RemoteUnwindFromPid()
405 pid_t pid; in RemoteThroughSignal() local
406 if ((pid = fork()) == 0) { in RemoteThroughSignal()
416 ASSERT_NE(-1, pid); in RemoteThroughSignal()
417 TestScopedPidReaper reap(pid); in RemoteThroughSignal()
421 WaitForRemote(pid, reinterpret_cast<uint64_t>(&g_ready_for_remote), false, &completed); in RemoteThroughSignal()
423 ASSERT_EQ(0, kill(pid, SIGUSR1)); in RemoteThroughSignal()
425 WaitForRemote(pid, reinterpret_cast<uint64_t>(&g_signal_ready_for_remote), true, &completed); in RemoteThroughSignal()
428 RemoteMaps maps(pid); in RemoteThroughSignal()
430 std::unique_ptr<Regs> regs(Regs::RemoteGet(pid)); in RemoteThroughSignal()
433 VerifyUnwind(pid, &maps, regs.get(), kFunctionSignalOrder); in RemoteThroughSignal()
435 ASSERT_EQ(0, ptrace(PTRACE_DETACH, pid, 0, 0)) in RemoteThroughSignal()