mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 06:45:56 +08:00
Remove ptid_get_pid
This removes ptid_get_pid in favor of calling the ptid_t::pid method. gdb/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * common/ptid.c (ptid_get_pid): Remove. * common/ptid.h (ptid_get_pid): Don't declare. * aarch64-linux-nat.c: Update. * ada-lang.c: Update. * aix-thread.c: Update. * alpha-bsd-nat.c: Update. * amd64-fbsd-nat.c: Update. * amd64-linux-nat.c: Update. * arm-linux-nat.c: Update. * arm-nbsd-nat.c: Update. * auxv.c: Update. * break-catch-syscall.c: Update. * breakpoint.c: Update. * bsd-uthread.c: Update. * corelow.c: Update. * ctf.c: Update. * darwin-nat.c: Update. * fbsd-nat.c: Update. * fbsd-tdep.c: Update. * gcore.c: Update. * gnu-nat.c: Update. * hppa-nbsd-nat.c: Update. * hppa-obsd-nat.c: Update. * i386-fbsd-nat.c: Update. * ia64-linux-nat.c: Update. * inf-ptrace.c: Update. * infcmd.c: Update. * inferior.c: Update. * inferior.h: Update. * inflow.c: Update. * infrun.c: Update. * linux-fork.c: Update. * linux-nat.c: Update. * linux-tdep.c: Update. * linux-thread-db.c: Update. * m68k-bsd-nat.c: Update. * mi/mi-interp.c: Update. * mi/mi-main.c: Update. * mips-linux-nat.c: Update. * mips-nbsd-nat.c: Update. * mips64-obsd-nat.c: Update. * nat/aarch64-linux-hw-point.c: Update. * nat/aarch64-linux.c: Update. * nat/linux-btrace.c: Update. * nat/linux-osdata.c: Update. * nat/linux-procfs.c: Update. * nat/x86-linux-dregs.c: Update. * nto-procfs.c: Update. * obsd-nat.c: Update. * ppc-linux-nat.c: Update. * ppc-nbsd-nat.c: Update. * ppc-obsd-nat.c: Update. * proc-service.c: Update. * procfs.c: Update. * python/py-inferior.c: Update. * python/py-infthread.c: Update. * ravenscar-thread.c: Update. * record.c: Update. * remote-sim.c: Update. * remote.c: Update. * rs6000-nat.c: Update. * s390-linux-nat.c: Update. * sh-nbsd-nat.c: Update. * sol-thread.c: Update. * sparc-nat.c: Update. * sparc64-tdep.c: Update. * spu-linux-nat.c: Update. * spu-tdep.c: Update. * target-debug.h: Update. * target.c: Update. * thread.c: Update. * tid-parse.c: Update. * tracefile-tfile.c: Update. * vax-bsd-nat.c: Update. * windows-nat.c: Update. * x86-linux-nat.c: Update. * x86-nat.c: Update. gdb/gdbserver/ChangeLog 2018-07-03 Tom Tromey <tom@tromey.com> * linux-low.c: Update. * linux-mips-low.c: Update. * lynx-low.c: Update. * mem-break.c: Update. * nto-low.c: Update. * remote-utils.c: Update. * server.c: Update. * spu-low.c: Update. * target.c: Update. * tracepoint.c: Update.
This commit is contained in:
@ -311,7 +311,7 @@ nto_procfs_target::thread_alive (ptid_t ptid)
|
||||
int err;
|
||||
|
||||
tid = ptid_get_tid (ptid);
|
||||
pid = ptid_get_pid (ptid);
|
||||
pid = ptid.pid ();
|
||||
|
||||
if (kill (pid, 0) == -1)
|
||||
return false;
|
||||
@ -398,7 +398,7 @@ nto_procfs_target::update_thread_list ()
|
||||
|
||||
prune_threads ();
|
||||
|
||||
pid = ptid_get_pid (inferior_ptid);
|
||||
pid = inferior_ptid.pid ();
|
||||
|
||||
status.tid = 1;
|
||||
|
||||
@ -746,7 +746,7 @@ do_attach (ptid_t ptid)
|
||||
char path[PATH_MAX];
|
||||
|
||||
snprintf (path, PATH_MAX - 1, "%s%s/%d/as",
|
||||
(nodestr != NULL) ? nodestr : "", "/proc", ptid_get_pid (ptid));
|
||||
(nodestr != NULL) ? nodestr : "", "/proc", ptid.pid ());
|
||||
ctl_fd = open (path, O_RDWR);
|
||||
if (ctl_fd == -1)
|
||||
error (_("Couldn't open proc file %s, error %d (%s)"), path, errno,
|
||||
@ -764,9 +764,9 @@ do_attach (ptid_t ptid)
|
||||
|
||||
if (devctl (ctl_fd, DCMD_PROC_STATUS, &status, sizeof (status), 0) == EOK
|
||||
&& status.flags & _DEBUG_FLAG_STOPPED)
|
||||
SignalKill (nto_node (), ptid_get_pid (ptid), 0, SIGCONT, 0, 0);
|
||||
SignalKill (nto_node (), ptid.pid (), 0, SIGCONT, 0, 0);
|
||||
nto_init_solib_absolute_prefix ();
|
||||
return ptid_t (ptid_get_pid (ptid), 0, status.tid);
|
||||
return ptid_t (ptid.pid (), 0, status.tid);
|
||||
}
|
||||
|
||||
/* Ask the user what to do when an interrupt is received. */
|
||||
@ -873,7 +873,7 @@ nto_procfs_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
{
|
||||
int waitval = 0;
|
||||
|
||||
waitpid (ptid_get_pid (inferior_ptid), &waitval, WNOHANG);
|
||||
waitpid (inferior_ptid.pid (), &waitval, WNOHANG);
|
||||
if (exit_signo)
|
||||
{
|
||||
/* Abnormal death. */
|
||||
@ -1013,12 +1013,12 @@ nto_procfs_target::detach (inferior *inf, int from_tty)
|
||||
target_announce_detach ();
|
||||
|
||||
if (siggnal)
|
||||
SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0, 0, 0, 0);
|
||||
SignalKill (nto_node (), inferior_ptid.pid (), 0, 0, 0, 0);
|
||||
|
||||
close (ctl_fd);
|
||||
ctl_fd = -1;
|
||||
|
||||
pid = ptid_get_pid (inferior_ptid);
|
||||
pid = inferior_ptid.pid ();
|
||||
inferior_ptid = null_ptid;
|
||||
detach_inferior (pid);
|
||||
init_thread_list ();
|
||||
@ -1113,7 +1113,7 @@ nto_procfs_target::resume (ptid_t ptid, int step, enum gdb_signal signo)
|
||||
{
|
||||
if (signal_to_pass != status.info.si_signo)
|
||||
{
|
||||
SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0,
|
||||
SignalKill (nto_node (), inferior_ptid.pid (), 0,
|
||||
signal_to_pass, 0, 0);
|
||||
run.flags |= _DEBUG_RUN_CLRFLT | _DEBUG_RUN_CLRSIG;
|
||||
}
|
||||
@ -1137,7 +1137,7 @@ nto_procfs_target::mourn_inferior ()
|
||||
{
|
||||
if (!ptid_equal (inferior_ptid, null_ptid))
|
||||
{
|
||||
SignalKill (nto_node (), ptid_get_pid (inferior_ptid), 0, SIGKILL, 0, 0);
|
||||
SignalKill (nto_node (), inferior_ptid.pid (), 0, SIGKILL, 0, 0);
|
||||
close (ctl_fd);
|
||||
}
|
||||
inferior_ptid = null_ptid;
|
||||
@ -1468,7 +1468,7 @@ nto_procfs_target::pid_to_str (ptid_t ptid)
|
||||
int pid, tid, n;
|
||||
struct tidinfo *tip;
|
||||
|
||||
pid = ptid_get_pid (ptid);
|
||||
pid = ptid.pid ();
|
||||
tid = ptid_get_tid (ptid);
|
||||
|
||||
n = snprintf (buf, 1023, "process %d", pid);
|
||||
|
Reference in New Issue
Block a user