diff options
author | Yao Qi <yao@codesourcery.com> | 2013-11-04 17:53:56 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-12-18 11:47:03 +0800 |
commit | 4ac248ca0beb1dfdb56716a440c4558b89fd7b1a (patch) | |
tree | cddff8dd11f2b414f47ccb5ff1b44e5290121543 /gdb/target.h | |
parent | cde33bf1035aac8e2e35c4699544dcc166f2054d (diff) | |
download | binutils-gdb-4ac248ca0beb1dfdb56716a440c4558b89fd7b1a.tar.gz |
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 <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 *'.
Diffstat (limited to 'gdb/target.h')
-rw-r--r-- | gdb/target.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gdb/target.h b/gdb/target.h index f22e5c69182..5b9b34d7a3d 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -238,6 +238,15 @@ enum trace_find_type 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 @@ -319,12 +328,7 @@ extern char *target_read_stralloc (struct target_ops *ops, 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. |