/* SPU native-dependent code for GDB, the GNU debugger.
- Copyright (C) 2006-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2015 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
#include "defs.h"
#include "gdbcore.h"
-#include <string.h>
#include "target.h"
#include "inferior.h"
#include "inf-child.h"
#include "gdbthread.h"
#include "gdb_bfd.h"
-#include <sys/ptrace.h>
+#include "nat/gdb_ptrace.h"
#include <asm/ptrace.h>
#include <sys/types.h>
}
-/* Copy LEN bytes at OFFSET in spufs file ANNEX into/from READBUF or WRITEBUF,
+/* Implement the to_xfer_partial target_ops method for TARGET_OBJECT_SPU.
+ Copy LEN bytes at OFFSET in spufs file ANNEX into/from READBUF or WRITEBUF,
using the /proc file system. */
+
static enum target_xfer_status
spu_proc_xfer_spu (const char *annex, gdb_byte *readbuf,
const gdb_byte *writebuf,
table to find the extent of the last section but that seems
pointless when the size is needed only for checks of other
parsed values in dbxread.c. */
+ memset (sb, 0, sizeof (struct stat));
sb->st_size = INT_MAX;
return 0;
}
/* Override the post_startup_inferior routine to continue running
the inferior until the first spu_run system call. */
static void
-spu_child_post_startup_inferior (ptid_t ptid)
+spu_child_post_startup_inferior (struct target_ops *self, ptid_t ptid)
{
int fd;
ULONGEST addr;
/* Override the post_attach routine to try load the SPE executable
file image from its copy inside the target process. */
static void
-spu_child_post_attach (int pid)
+spu_child_post_attach (struct target_ops *self, int pid)
{
int fd;
ULONGEST addr;
/* Override the to_can_use_hw_breakpoint routine. */
static int
-spu_can_use_hw_breakpoint (int type, int cnt, int othertype)
+spu_can_use_hw_breakpoint (struct target_ops *self,
+ int type, int cnt, int othertype)
{
return 0;
}