mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Remove pid_to_ptid
This removes pid_to_ptid in favor of calling the ptid_t constructor directly. gdb/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * common/ptid.c (pid_to_ptid): Remove. * common/ptid.h (pid_to_ptid): Don't declare. * aix-thread.c: Update. * arm-linux-nat.c: Update. * common/ptid.c: Update. * common/ptid.h: Update. * corelow.c: Update. * ctf.c: Update. * darwin-nat.c: Update. * fbsd-nat.c: Update. * fork-child.c: Update. * gnu-nat.c: Update. * go32-nat.c: Update. * inf-ptrace.c: Update. * infcmd.c: Update. * inferior.c: Update. * infrun.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * nat/aarch64-linux-hw-point.c: Update. * nat/fork-inferior.c: Update. * nat/x86-linux-dregs.c: Update. * nto-procfs.c: Update. * obsd-nat.c: Update. * procfs.c: Update. * progspace.c: Update. * remote.c: Update. * rs6000-nat.c: Update. * s390-linux-nat.c: Update. * sol-thread.c: Update. * spu-linux-nat.c: Update. * target.c: Update. * top.c: Update. * tracefile-tfile.c: Update. * windows-nat.c: Update. gdb/gdbserver/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * linux-low.c: Update. * linux-ppc-low.c: Update. * linux-x86-low.c: Update. * proc-service.c: Update. * server.c: Update. * spu-low.c: Update. * thread-db.c: Update. * win32-low.c: Update.
This commit is contained in:
@ -1466,17 +1466,17 @@ linux_nat_target::detach (inferior *inf, int from_tty)
|
||||
|
||||
/* Stop all threads before detaching. ptrace requires that the
|
||||
thread is stopped to sucessfully detach. */
|
||||
iterate_over_lwps (pid_to_ptid (pid), stop_callback, NULL);
|
||||
iterate_over_lwps (ptid_t (pid), stop_callback, NULL);
|
||||
/* ... and wait until all of them have reported back that
|
||||
they're no longer running. */
|
||||
iterate_over_lwps (pid_to_ptid (pid), stop_wait_callback, NULL);
|
||||
iterate_over_lwps (ptid_t (pid), stop_wait_callback, NULL);
|
||||
|
||||
iterate_over_lwps (pid_to_ptid (pid), detach_callback, NULL);
|
||||
iterate_over_lwps (ptid_t (pid), detach_callback, NULL);
|
||||
|
||||
/* Only the initial process should be left right now. */
|
||||
gdb_assert (num_lwps (pid) == 1);
|
||||
|
||||
main_lwp = find_lwp_pid (pid_to_ptid (pid));
|
||||
main_lwp = find_lwp_pid (ptid_t (pid));
|
||||
|
||||
if (forks_exist_p ())
|
||||
{
|
||||
@ -2920,7 +2920,7 @@ linux_nat_filter_event (int lwpid, int status)
|
||||
struct lwp_info *lp;
|
||||
int event = linux_ptrace_get_extended_event (status);
|
||||
|
||||
lp = find_lwp_pid (pid_to_ptid (lwpid));
|
||||
lp = find_lwp_pid (ptid_t (lwpid));
|
||||
|
||||
/* Check for stop events reported by a process we didn't already
|
||||
know about - anything not already in our LWP list.
|
||||
@ -3125,7 +3125,7 @@ linux_nat_filter_event (int lwpid, int status)
|
||||
will receive it - unless they're using CLONE_THREAD to
|
||||
share signals. Since we only want to report it once, we
|
||||
mark it as ignored for all LWPs except this one. */
|
||||
iterate_over_lwps (pid_to_ptid (ptid_get_pid (lp->ptid)),
|
||||
iterate_over_lwps (ptid_t (ptid_get_pid (lp->ptid)),
|
||||
set_ignore_sigint, NULL);
|
||||
lp->ignore_sigint = 0;
|
||||
}
|
||||
@ -3176,7 +3176,7 @@ check_zombie_leaders (void)
|
||||
if (inf->pid == 0)
|
||||
continue;
|
||||
|
||||
leader_lp = find_lwp_pid (pid_to_ptid (inf->pid));
|
||||
leader_lp = find_lwp_pid (ptid_t (inf->pid));
|
||||
if (leader_lp != NULL
|
||||
/* Check if there are other threads in the group, as we may
|
||||
have raced with the inferior simply exiting. */
|
||||
@ -3713,7 +3713,7 @@ linux_nat_target::kill ()
|
||||
linux_fork_killall ();
|
||||
else
|
||||
{
|
||||
ptid_t ptid = pid_to_ptid (ptid_get_pid (inferior_ptid));
|
||||
ptid_t ptid = ptid_t (ptid_get_pid (inferior_ptid));
|
||||
|
||||
/* Stop all threads before killing them, since ptrace requires
|
||||
that the thread is stopped to sucessfully PTRACE_KILL. */
|
||||
|
Reference in New Issue
Block a user