From 4ac248ca0beb1dfdb56716a440c4558b89fd7b1a Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 4 Nov 2013 17:53:56 +0800 Subject: Add target_xfer_partial_ftype This patch adds a typedef target_xfer_partial_ftype. When we change the signature of xfer_partial functions (for example, adding a new parameter), we don't have to modify all of their declarations. This patch also updates the type of parameters of target_xfer_partial from "void *" to "gdb_byte *". gdb: 2013-12-18 Yao Qi * 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 *'. --- gdb/target.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'gdb/target.c') diff --git a/gdb/target.c b/gdb/target.c index 85b5037..04dc063 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -70,17 +70,9 @@ static void target_command (char *, int); 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); @@ -1695,7 +1687,7 @@ make_show_memory_breakpoints_cleanup (int show) 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; -- cgit v1.1