This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] Use target_xfer_partial_ftype for rs6000_xfer_shared_libraries
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 8 Jan 2014 11:49:13 +0400
- Subject: Re: [PATCH 1/4] Use target_xfer_partial_ftype for rs6000_xfer_shared_libraries
- Authentication-results: sourceware.org; auth=none
- References: <1389166060-434-1-git-send-email-yao at codesourcery dot com> <1389166060-434-2-git-send-email-yao at codesourcery dot com>
> 2014-01-08 Yao Qi <yao@codesourcery.com>
>
> * rs6000-nat.c (rs6000_xfer_shared_libraries): Use
> target_xfer_partial_ftype.
This one is a nice cleanup on its own, and can go in now, regardless
of the rest of the patch series. You can treat other changes of this
kind as obvious.
An option, if we want to get rid of the advance declaration, is to
move the function's body ahead of rs6000_xfer_partial (not sure if
that triggers other issues, though).
> ---
> gdb/rs6000-nat.c | 5 +----
> 1 files changed, 1 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
> index a297376..da17b94 100644
> --- a/gdb/rs6000-nat.c
> +++ b/gdb/rs6000-nat.c
> @@ -79,10 +79,7 @@
>
> static void exec_one_dummy_insn (struct regcache *);
>
> -static LONGEST rs6000_xfer_shared_libraries
> - (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 rs6000_xfer_shared_libraries;
>
> /* Given REGNO, a gdb register number, return the corresponding
> number suitable for use as a ptrace() parameter. Return -1 if
> --
> 1.7.7.6
--
Joel