diff options
Diffstat (limited to 'gdb/spu-linux-nat.c')
-rw-r--r-- | gdb/spu-linux-nat.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c index 9855bac..a456117 100644 --- a/gdb/spu-linux-nat.c +++ b/gdb/spu-linux-nat.c @@ -48,9 +48,9 @@ fetch_ppc_register (int regno) { PTRACE_TYPE_RET res; - int tid = TIDGET (inferior_ptid); + int tid = ptid_get_lwp (inferior_ptid); if (tid == 0) - tid = PIDGET (inferior_ptid); + tid = ptid_get_pid (inferior_ptid); #ifndef __powerpc64__ /* If running as a 32-bit process on a 64-bit system, we attempt @@ -133,9 +133,9 @@ fetch_ppc_memory (ULONGEST memaddr, gdb_byte *myaddr, int len) / sizeof (PTRACE_TYPE_RET)); PTRACE_TYPE_RET *buffer; - int tid = TIDGET (inferior_ptid); + int tid = ptid_get_lwp (inferior_ptid); if (tid == 0) - tid = PIDGET (inferior_ptid); + tid = ptid_get_pid (inferior_ptid); buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET)); for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET)) @@ -163,9 +163,9 @@ store_ppc_memory (ULONGEST memaddr, const gdb_byte *myaddr, int len) / sizeof (PTRACE_TYPE_RET)); PTRACE_TYPE_RET *buffer; - int tid = TIDGET (inferior_ptid); + int tid = ptid_get_lwp (inferior_ptid); if (tid == 0) - tid = PIDGET (inferior_ptid); + tid = ptid_get_pid (inferior_ptid); buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET)); @@ -236,7 +236,7 @@ spu_proc_xfer_spu (const char *annex, gdb_byte *readbuf, char buf[128]; int fd = 0; int ret = -1; - int pid = PIDGET (inferior_ptid); + int pid = ptid_get_pid (inferior_ptid); if (!annex) return 0; @@ -394,9 +394,9 @@ spu_child_post_startup_inferior (ptid_t ptid) int fd; ULONGEST addr; - int tid = TIDGET (ptid); + int tid = ptid_get_lwp (ptid); if (tid == 0) - tid = PIDGET (ptid); + tid = ptid_get_pid (ptid); while (!parse_spufs_run (&fd, &addr)) { @@ -443,16 +443,17 @@ spu_child_wait (struct target_ops *ops, set_sigint_trap (); /* Causes SIGINT to be passed on to the attached process. */ - pid = waitpid (PIDGET (ptid), &status, 0); + pid = waitpid (ptid_get_pid (ptid), &status, 0); if (pid == -1 && errno == ECHILD) /* Try again with __WCLONE to check cloned processes. */ - pid = waitpid (PIDGET (ptid), &status, __WCLONE); + pid = waitpid (ptid_get_pid (ptid), &status, __WCLONE); save_errno = errno; /* Make sure we don't report an event for the exit of the original program, if we've detached from it. */ - if (pid != -1 && !WIFSTOPPED (status) && pid != PIDGET (inferior_ptid)) + if (pid != -1 && !WIFSTOPPED (status) + && pid != ptid_get_pid (inferior_ptid)) { pid = -1; save_errno = EINTR; |