Lines Matching refs:pid

97   int pid;  member
116 add_to_pid_list (struct simple_pid_list **listp, int pid) in add_to_pid_list() argument
119 new_pid->pid = pid; in add_to_pid_list()
125 pull_pid_from_list (struct simple_pid_list **listp, int pid) in pull_pid_from_list() argument
130 if ((*p)->pid == pid) in pull_pid_from_list()
141 linux_record_stopped_pid (int pid) in linux_record_stopped_pid() argument
143 add_to_pid_list (&stopped_pids, pid); in linux_record_stopped_pid()
163 my_waitpid (int pid, int *status, int flags) in my_waitpid() argument
168 ret = waitpid (pid, status, flags); in my_waitpid()
277 linux_supports_tracefork (int pid) in linux_supports_tracefork() argument
280 linux_test_for_tracefork (pid); in linux_supports_tracefork()
285 linux_supports_tracevforkdone (int pid) in linux_supports_tracevforkdone() argument
288 linux_test_for_tracefork (pid); in linux_supports_tracevforkdone()
296 int pid = ptid_get_lwp (ptid); in linux_enable_event_reporting() local
299 if (pid == 0) in linux_enable_event_reporting()
300 pid = ptid_get_pid (ptid); in linux_enable_event_reporting()
302 if (! linux_supports_tracefork (pid)) in linux_enable_event_reporting()
307 if (linux_supports_tracevforkdone (pid)) in linux_enable_event_reporting()
313 ptrace (PTRACE_SETOPTIONS, pid, 0, options); in linux_enable_event_reporting()
317 child_post_attach (int pid) in child_post_attach() argument
319 linux_enable_event_reporting (pid_to_ptid (pid)); in child_post_attach()
479 linux_handle_extended_wait (int pid, int status, in linux_handle_extended_wait() argument
490 ptrace (PTRACE_GETEVENTMSG, pid, 0, &new_pid); in linux_handle_extended_wait()
524 = xstrdup (child_pid_to_exec_file (pid)); in linux_handle_extended_wait()
543 child_insert_fork_catchpoint (int pid) in child_insert_fork_catchpoint() argument
545 if (! linux_supports_tracefork (pid)) in child_insert_fork_catchpoint()
550 child_insert_vfork_catchpoint (int pid) in child_insert_vfork_catchpoint() argument
552 if (!linux_supports_tracefork (pid)) in child_insert_vfork_catchpoint()
557 child_insert_exec_catchpoint (int pid) in child_insert_exec_catchpoint() argument
559 if (!linux_supports_tracefork (pid)) in child_insert_exec_catchpoint()
567 int pid = PIDGET (inferior_ptid); in kill_inferior() local
572 if (pid == 0) in kill_inferior()
589 ptrace (PT_KILL, pid, 0, 0); in kill_inferior()
595 while (ret == pid && WIFSTOPPED (status)) in kill_inferior()
597 ptrace (PT_KILL, pid, 0, 0); in kill_inferior()
650 #define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) argument
857 pid_t pid; in lin_lwp_attach_lwp() local
869 pid = my_waitpid (GET_LWP (ptid), &status, 0); in lin_lwp_attach_lwp()
870 if (pid == -1 && errno == ECHILD) in lin_lwp_attach_lwp()
873 pid = my_waitpid (GET_LWP (ptid), &status, __WCLONE); in lin_lwp_attach_lwp()
877 gdb_assert (pid == GET_LWP (ptid) in lin_lwp_attach_lwp()
880 child_post_attach (pid); in lin_lwp_attach_lwp()
908 pid_t pid; in linux_nat_attach() local
921 pid = my_waitpid (GET_PID (inferior_ptid), &status, 0); in linux_nat_attach()
922 if (pid == -1 && errno == ECHILD) in linux_nat_attach()
927 pid = my_waitpid (GET_PID (inferior_ptid), &status, __WCLONE); in linux_nat_attach()
931 gdb_assert (pid == GET_PID (inferior_ptid) in linux_nat_attach()
942 "LLA: waitpid %ld, faking SIGSTOP\n", (long) pid); in linux_nat_attach()
1185 pid_t pid; in wait_lwp() local
1192 pid = my_waitpid (GET_LWP (lp->ptid), &status, 0); in wait_lwp()
1193 if (pid == -1 && errno == ECHILD) in wait_lwp()
1195 pid = my_waitpid (GET_LWP (lp->ptid), &status, __WCLONE); in wait_lwp()
1196 if (pid == -1 && errno == ECHILD) in wait_lwp()
1212 gdb_assert (pid == GET_LWP (lp->ptid)); in wait_lwp()
1439 linux_nat_has_pending (int pid, sigset_t *pending, sigset_t *flush_mask) in linux_nat_has_pending() argument
1444 linux_proc_pending_signals (pid, pending, &blocked, &ignored); in linux_nat_has_pending()
1472 int pid, status; in flush_callback() local
1697 pid_t pid; in child_wait() local
1707 pid = my_waitpid (GET_PID (ptid), &status, 0); in child_wait()
1708 if (pid == -1 && errno == ECHILD) in child_wait()
1710 pid = my_waitpid (GET_PID (ptid), &status, __WCLONE); in child_wait()
1716 (long) pid, status_to_str (status)); in child_wait()
1723 if (pid != -1 && !WIFSTOPPED (status) && pid != GET_PID (inferior_ptid)) in child_wait()
1725 pid = -1; in child_wait()
1739 if (pid != -1 && WIFSTOPPED (status) && WSTOPSIG (status) == SIGSTOP in child_wait()
1740 && pid != GET_PID (inferior_ptid)) in child_wait()
1742 linux_record_stopped_pid (pid); in child_wait()
1743 pid = -1; in child_wait()
1748 if (pid != -1 && WIFSTOPPED (status) && WSTOPSIG (status) == SIGTRAP in child_wait()
1751 linux_handle_extended_wait (pid, status, ourstatus); in child_wait()
1761 ptrace (PTRACE_CONT, pid, 0, 0); in child_wait()
1762 pid = -1; in child_wait()
1770 while (pid == -1 && save_errno == EINTR); in child_wait()
1772 if (pid == -1) in child_wait()
1786 return pid_to_ptid (pid); in child_wait()
1819 pid_t pid = PIDGET (ptid); in linux_nat_wait() local
1838 if (pid == -1) in linux_nat_wait()
1882 pid = GET_LWP (ptid); in linux_nat_wait()
1921 lwpid = my_waitpid (pid, &status, options); in linux_nat_wait()
1924 gdb_assert (pid == -1 || lwpid == pid); in linux_nat_wait()
2121 if (pid == -1) in linux_nat_wait()
2202 if (pid == -1) in linux_nat_wait()
2252 pid_t pid; in kill_wait_callback() local
2265 pid = my_waitpid (GET_LWP (lp->ptid), NULL, __WCLONE); in kill_wait_callback()
2266 if (pid != (pid_t) -1 && debug_linux_nat) in kill_wait_callback()
2273 while (pid == GET_LWP (lp->ptid)); in kill_wait_callback()
2275 gdb_assert (pid == -1 && errno == ECHILD); in kill_wait_callback()
2280 pid = my_waitpid (GET_LWP (lp->ptid), NULL, 0); in kill_wait_callback()
2281 if (pid != (pid_t) -1 && debug_linux_nat) in kill_wait_callback()
2288 while (pid == GET_LWP (lp->ptid)); in kill_wait_callback()
2290 gdb_assert (pid == -1 && errno == ECHILD); in kill_wait_callback()
2425 child_pid_to_exec_file (int pid) in child_pid_to_exec_file() argument
2435 sprintf (name1, "/proc/%d/exe", pid); in child_pid_to_exec_file()
2479 long long pid = PIDGET (inferior_ptid); in linux_nat_find_memory_regions() local
2488 sprintf (mapsfilename, "/proc/%lld/maps", pid); in linux_nat_find_memory_regions()
2678 long long pid = PIDGET (inferior_ptid); in linux_nat_info_proc_cmd() local
2705 pid = strtoul (argv[0], NULL, 10); in linux_nat_info_proc_cmd()
2741 if (pid == 0) in linux_nat_info_proc_cmd()
2744 sprintf (fname1, "/proc/%lld", pid); in linux_nat_info_proc_cmd()
2748 printf_filtered (_("process %lld\n"), pid); in linux_nat_info_proc_cmd()
2751 sprintf (fname1, "/proc/%lld/cmdline", pid); in linux_nat_info_proc_cmd()
2763 sprintf (fname1, "/proc/%lld/cwd", pid); in linux_nat_info_proc_cmd()
2772 sprintf (fname1, "/proc/%lld/exe", pid); in linux_nat_info_proc_cmd()
2781 sprintf (fname1, "/proc/%lld/maps", pid); in linux_nat_info_proc_cmd()
2841 sprintf (fname1, "/proc/%lld/status", pid); in linux_nat_info_proc_cmd()
2853 sprintf (fname1, "/proc/%lld/stat", pid); in linux_nat_info_proc_cmd()
3030 linux_proc_pending_signals (int pid, sigset_t *pending, sigset_t *blocked, sigset_t *ignored) in linux_proc_pending_signals() argument
3039 sprintf (fname, "/proc/%d/status", pid); in linux_proc_pending_signals()