Updated copyright notices for most files.
[deliverable/binutils-gdb.git] / gdb / spu-linux-nat.c
index 21a7c5d00d796afdfd4c4dfcce32ae18168d32d5..0786083a66fdc5ada10b98a34f3816c5f3ddb7d2 100644 (file)
@@ -1,5 +1,5 @@
 /* SPU native-dependent code for GDB, the GNU debugger.
-   Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -7,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -16,9 +16,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "gdbcore.h"
@@ -29,7 +27,7 @@
 #include "regcache.h"
 #include "symfile.h"
 #include "gdb_wait.h"
-#include "gdb_stdint.h"
+#include "gdbthread.h"
 
 #include <sys/ptrace.h>
 #include <asm/ptrace.h>
@@ -416,7 +414,6 @@ spu_child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
     {
       set_sigint_trap ();      /* Causes SIGINT to be passed on to the
                                   attached process.  */
-      set_sigio_trap ();
 
       pid = waitpid (PIDGET (ptid), &status, 0);
       if (pid == -1 && errno == ECHILD)
@@ -433,7 +430,6 @@ spu_child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
          save_errno = EINTR;
        }
 
-      clear_sigio_trap ();
       clear_sigint_trap ();
     }
   while (pid == -1 && save_errno == EINTR);
@@ -446,7 +442,7 @@ spu_child_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
       /* Claim it exited with unknown signal.  */
       ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
       ourstatus->value.sig = TARGET_SIGNAL_UNKNOWN;
-      return minus_one_ptid;
+      return inferior_ptid;
     }
 
   store_waitstatus (ourstatus, status);
@@ -535,6 +531,9 @@ spu_xfer_partial (struct target_ops *ops,
                  gdb_byte *readbuf, const gdb_byte *writebuf,
                  ULONGEST offset, LONGEST len)
 {
+  if (object == TARGET_OBJECT_SPU)
+    return spu_proc_xfer_spu (annex, readbuf, writebuf, offset, len);
+
   if (object == TARGET_OBJECT_MEMORY)
     {
       int fd;
This page took 0.026805 seconds and 4 git commands to generate.