/* Cell SPU GNU/Linux support -- shared library handling.
- Copyright (C) 2009-2013 Free Software Foundation, Inc.
+ Copyright (C) 2009-2014 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
#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"
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>",
yet. Skip such entries; we'll be back for them later. */
xsnprintf (annex, sizeof annex, "%d/object-id", fd);
len = target_read (¤t_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;
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. */
spu_bfd_iovec_close (bfd *nbfd, void *stream)
{
xfree (stream);
- return 1;
+
+ /* Zero means success. */
+ return 0;
}
static file_ptr