Add "volatile" keyword to "struct gdb_exception" declaration
[deliverable/binutils-gdb.git] / gdb / solib-spu.c
index 09a40474a754fcddc5c73641d4235aed7496fb02..b8e5e2359b7c91eb84bbd407e9a9a6ec337367e2 100644 (file)
@@ -1,5 +1,5 @@
 /* Cell SPU GNU/Linux support -- shared library handling.
-   Copyright (C) 2009-2012 Free Software Foundation, Inc.
+   Copyright (C) 2009-2014 Free Software Foundation, Inc.
 
    Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
 
@@ -21,9 +21,9 @@
 #include "defs.h"
 #include "solib-spu.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "arch-utils.h"
 #include "bfd.h"
 #include "symtab.h"
@@ -125,7 +125,7 @@ append_ocl_sos (struct so_list **link_ptr)
                  struct so_list *new;
 
                  /* Allocate so_list structure.  */
-                 new = XZALLOC (struct so_list);
+                 new = XCNEW (struct so_list);
 
                  /* Encode FD and object ID in path name.  */
                  xsnprintf (new->so_name, sizeof new->so_name, "@%s <%d>",
@@ -162,7 +162,7 @@ spu_current_sos (void)
   struct so_list *head;
   struct so_list **link_ptr;
 
-  char buf[MAX_SPE_FD * 4];
+  gdb_byte buf[MAX_SPE_FD * 4];
   int i, size;
 
   /* First, retrieve the SVR4 shared library list.  */
@@ -209,7 +209,7 @@ spu_current_sos (void)
         yet.  Skip such entries; we'll be back for them later.  */
       xsnprintf (annex, sizeof annex, "%d/object-id", fd);
       len = target_read (&current_target, TARGET_OBJECT_SPU, annex,
-                        id, 0, sizeof id);
+                        (gdb_byte *) id, 0, sizeof id);
       if (len <= 0 || len >= sizeof id)
        continue;
       id[len] = 0;
@@ -217,7 +217,7 @@ spu_current_sos (void)
        continue;
 
       /* Allocate so_list structure.  */
-      new = XZALLOC (struct so_list);
+      new = XCNEW (struct so_list);
 
       /* Encode FD and object ID in path name.  Choose the name so as not
         to conflict with any (normal) SVR4 library path name.  */
@@ -286,7 +286,9 @@ static int
 spu_bfd_iovec_close (bfd *nbfd, void *stream)
 {
   xfree (stream);
-  return 1;
+
+  /* Zero means success.  */
+  return 0;
 }
 
 static file_ptr
This page took 0.023801 seconds and 4 git commands to generate.