+2013-12-18 Yao Qi <yao@codesourcery.com>
+
+ * target.h (target_xfer_partial_ftype): New typedef.
+ (target_xfer_partial): Update declaration.
+ * auxv.h (memory_xfer_auxv): Likewise.
+ * ia64-hpux-nat.c (super_xfer_partial): Likewise.
+ * ia64-linux-nat.c (super_xfer_partial): Likewise.
+ * linux-nat.c (super_xfer_partial): Likewise.
+ * procfs.c (procfs_xfer_partial): Likewise.
+ * record-full.c (record_full_beneath_to_xfer_partial):
+ (tmp_to_xfer_partial): Likewise.
+ * sparc-nat.c (inf_ptrace_xfer_partial): Likewise.
+ * target.c (default_xfer_partial): Likewise.
+ (current_xfer_partial): Likewise.
+ (target_xfer_partial): Change parameter type to 'gdb_byte *'.
+
2013-12-18 Yao Qi <yao@codesourcery.com>
* linux-nat.c (linux_proc_xfer_partial): Call xsnprintf instead
/* Print the contents of the target's AUXV on the specified file. */
extern int fprint_target_auxv (struct ui_file *file, struct target_ops *ops);
-extern LONGEST memory_xfer_auxv (struct target_ops *ops,
- enum target_object object,
- const char *annex,
- gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset,
- LONGEST len);
+extern target_xfer_partial_ftype memory_xfer_auxv;
#endif
need to be handled manually. So we override this routine and
delegate back if we detect that we are not in a special case. */
-static LONGEST (*super_xfer_partial) (struct target_ops *, enum target_object,
- const char *, gdb_byte *,
- const gdb_byte *, ULONGEST, LONGEST);
+static target_xfer_partial_ftype *super_xfer_partial;
/* The "xfer_partial" routine for a memory region that is completely
outside of the backing-store region. */
}
-static LONGEST (*super_xfer_partial) (struct target_ops *, enum target_object,
- const char *, gdb_byte *,
- const gdb_byte *, ULONGEST, LONGEST);
+static target_xfer_partial_ftype *super_xfer_partial;
static LONGEST
ia64_linux_xfer_partial (struct target_ops *ops,
/* The saved to_xfer_partial method, inherited from inf-ptrace.c.
Called by our to_xfer_partial. */
-static LONGEST (*super_xfer_partial) (struct target_ops *,
- enum target_object,
- const char *, gdb_byte *,
- const gdb_byte *,
- ULONGEST, LONGEST);
+static target_xfer_partial_ftype *super_xfer_partial;
static unsigned int debug_linux_nat;
static void
static int procfs_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
struct mem_attrib *attrib,
struct target_ops *);
-static LONGEST procfs_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex,
- gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset, LONGEST len);
+static target_xfer_partial_ftype procfs_xfer_partial;
static int procfs_thread_alive (struct target_ops *ops, ptid_t);
struct regcache *,
int regno);
static struct target_ops *record_full_beneath_to_xfer_partial_ops;
-static LONGEST
- (*record_full_beneath_to_xfer_partial) (struct target_ops *ops,
- enum target_object object,
- const char *annex,
- gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset,
- LONGEST len);
+static target_xfer_partial_ftype *record_full_beneath_to_xfer_partial;
static int
(*record_full_beneath_to_insert_breakpoint) (struct gdbarch *,
struct bp_target_info *);
struct regcache *,
int regno);
static struct target_ops *tmp_to_xfer_partial_ops;
-static LONGEST (*tmp_to_xfer_partial) (struct target_ops *ops,
- enum target_object object,
- const char *annex,
- gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset,
- LONGEST len);
+static target_xfer_partial_ftype *tmp_to_xfer_partial;
static int (*tmp_to_insert_breakpoint) (struct gdbarch *,
struct bp_target_info *);
static int (*tmp_to_remove_breakpoint) (struct gdbarch *,
return len;
}
-LONGEST (*inf_ptrace_xfer_partial) (struct target_ops *, enum target_object,
- const char *, gdb_byte *, const gdb_byte *,
- ULONGEST, LONGEST);
+target_xfer_partial_ftype *inf_ptrace_xfer_partial;
static LONGEST
sparc_xfer_partial (struct target_ops *ops, enum target_object object,
static struct target_ops *find_default_run_target (char *);
-static LONGEST default_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex, gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset, LONGEST len);
-
-static LONGEST current_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex, gdb_byte *readbuf,
- const gdb_byte *writebuf,
- ULONGEST offset, LONGEST len);
+static target_xfer_partial_ftype default_xfer_partial;
+
+static target_xfer_partial_ftype current_xfer_partial;
static struct gdbarch *default_thread_architecture (struct target_ops *ops,
ptid_t ptid);
LONGEST
target_xfer_partial (struct target_ops *ops,
enum target_object object, const char *annex,
- void *readbuf, const void *writebuf,
+ gdb_byte *readbuf, const gdb_byte *writebuf,
ULONGEST offset, LONGEST len)
{
LONGEST retval;
typedef struct static_tracepoint_marker *static_tracepoint_marker_p;
DEF_VEC_P(static_tracepoint_marker_p);
+typedef LONGEST
+ target_xfer_partial_ftype (struct target_ops *ops,
+ enum target_object object,
+ const char *annex,
+ gdb_byte *readbuf,
+ const gdb_byte *writebuf,
+ ULONGEST offset,
+ LONGEST len);
+
/* Request that OPS transfer up to LEN 8-bit bytes of the target's
OBJECT. The OFFSET, for a seekable object, specifies the
starting point. The ANNEX can be used to provide additional
const char *annex);
/* See target_ops->to_xfer_partial. */
-
-extern LONGEST target_xfer_partial (struct target_ops *ops,
- enum target_object object,
- const char *annex,
- void *readbuf, const void *writebuf,
- ULONGEST offset, LONGEST len);
+extern target_xfer_partial_ftype target_xfer_partial;
/* Wrappers to target read/write that perform memory transfers. They
throw an error if the memory transfer fails.