]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/spu-linux-nat.c
Remove ptid_get_pid
[thirdparty/binutils-gdb.git] / gdb / spu-linux-nat.c
index 18c1856f7b8f7d19f15c90b1a3bc232ff5117ad2..65b434efec0001d3b74d38844fa337aa8c38aa67 100644 (file)
@@ -71,7 +71,7 @@ fetch_ppc_register (int regno)
 
   int tid = ptid_get_lwp (inferior_ptid);
   if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);
+    tid = inferior_ptid.pid ();
 
 #ifndef __powerpc64__
   /* If running as a 32-bit process on a 64-bit system, we attempt
@@ -156,7 +156,7 @@ fetch_ppc_memory (ULONGEST memaddr, gdb_byte *myaddr, int len)
 
   int tid = ptid_get_lwp (inferior_ptid);
   if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);
+    tid = inferior_ptid.pid ();
 
   buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
   for (i = 0; i < count; i++, addr += sizeof (PTRACE_TYPE_RET))
@@ -186,7 +186,7 @@ store_ppc_memory (ULONGEST memaddr, const gdb_byte *myaddr, int len)
 
   int tid = ptid_get_lwp (inferior_ptid);
   if (tid == 0)
-    tid = ptid_get_pid (inferior_ptid);
+    tid = inferior_ptid.pid ();
 
   buffer = (PTRACE_TYPE_RET *) alloca (count * sizeof (PTRACE_TYPE_RET));
 
@@ -259,7 +259,7 @@ spu_proc_xfer_spu (const char *annex, gdb_byte *readbuf,
   char buf[128];
   int fd = 0;
   int ret = -1;
-  int pid = ptid_get_pid (inferior_ptid);
+  int pid = inferior_ptid.pid ();
 
   if (!annex)
     return TARGET_XFER_EOF;
@@ -424,7 +424,7 @@ spu_linux_nat_target::post_startup_inferior (ptid_t ptid)
 
   int tid = ptid_get_lwp (ptid);
   if (tid == 0)
-    tid = ptid_get_pid (ptid);
+    tid = ptid.pid ();
   
   while (!parse_spufs_run (&fd, &addr))
     {
@@ -471,17 +471,17 @@ spu_linux_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
       set_sigint_trap ();      /* Causes SIGINT to be passed on to the
                                   attached process.  */
 
-      pid = waitpid (ptid_get_pid (ptid), &status, 0);
+      pid = waitpid (ptid.pid (), &status, 0);
       if (pid == -1 && errno == ECHILD)
        /* Try again with __WCLONE to check cloned processes.  */
-       pid = waitpid (ptid_get_pid (ptid), &status, __WCLONE);
+       pid = waitpid (ptid.pid (), &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 != ptid_get_pid (inferior_ptid))
+         && pid != inferior_ptid.pid ())
        {
          pid = -1;
          save_errno = EINTR;