/* Cell SPU GNU/Linux support -- shared library handling.
- Copyright (C) 2009-2012 Free Software Foundation, Inc.
+ Copyright (C) 2009-2013 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
#include "breakpoint.h"
#include "gdbthread.h"
#include "exceptions.h"
+#include "gdb_bfd.h"
#include "spu-tdep.h"
inferior_thread ()->control.in_infcall = 1; /* Suppress MI messages. */
- target_resume (inferior_ptid, 1, TARGET_SIGNAL_0);
+ target_resume (inferior_ptid, 1, GDB_SIGNAL_0);
target_wait (minus_one_ptid, &ws, 0);
set_executing (minus_one_ptid, 0);
static struct so_list *
spu_current_sos (void)
{
- enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
+ enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
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. */
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;
spu_bfd_iovec_close (bfd *nbfd, void *stream)
{
xfree (stream);
- return 1;
+
+ /* Zero means success. */
+ return 0;
}
static file_ptr
CORE_ADDR *open_closure = xmalloc (sizeof (CORE_ADDR));
*open_closure = addr;
- nbfd = bfd_openr_iovec (xstrdup (name), "elf32-spu",
- spu_bfd_iovec_open, open_closure,
- spu_bfd_iovec_pread, spu_bfd_iovec_close,
- spu_bfd_iovec_stat);
+ nbfd = gdb_bfd_openr_iovec (name, "elf32-spu",
+ spu_bfd_iovec_open, open_closure,
+ spu_bfd_iovec_pread, spu_bfd_iovec_close,
+ spu_bfd_iovec_stat);
if (!nbfd)
return NULL;
if (!bfd_check_format (nbfd, bfd_object))
{
- bfd_close (nbfd);
+ gdb_bfd_unref (nbfd);
return NULL;
}
{
CORE_ADDR addr = SYMBOL_VALUE_ADDRESS (spe_event_sym);
- addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch, addr,
+ addr = gdbarch_convert_from_func_ptr_addr (target_gdbarch (), addr,
¤t_target);
- create_solib_event_breakpoint (target_gdbarch, addr);
+ create_solib_event_breakpoint (target_gdbarch (), addr);
return 1;
}