This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] Change 'len' of to_xfer_partial to ULONGEST
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 08 Jan 2014 12:38:41 +0000
- Subject: Re: [PATCH 0/4] Change 'len' of to_xfer_partial to ULONGEST
- Authentication-results: sourceware.org; auth=none
- References: <1389166060-434-1-git-send-email-yao at codesourcery dot com>
On 01/08/2014 07:27 AM, Yao Qi wrote:
> Hi,
> This patch series is a preparation for the changes mentioned in the
> discussion on changing target_ops method to_xfer_partial [1], in which,
> the expected change would be
>
> LONGEST (*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);
>
> to
>
> enum target_xfer_status (*to_xfer_partial) (struct target_ops *ops,
> enum target_object object, const char *annex,
> gdb_byte *readbuf, const gdb_byte *writebuf,
> ULONGEST offset, ULONGEST len, ULONGEST *xfered_len);
>
> I started from the 'len' "LONGEST -> ULONGEST" transition, and that
> is what this patch series tries to do. This change is quite mechanical.
> Regression tested on x86_64-linux with both native and gdbserver. I
> also rebuilt GDB in the following ways:
>
> - on x86-linux, with all targets enabled,
> - cross build native mingw32,mips-linux,hurd,sparc-linux, gdb on
> linux,
> - build native powerpc-linux gdb on gcc110
> - build spu-elf target on gcc110
> - build aix native gdb on gcc111
> - build native gdb for netbsd on gcc70
>
> There are still some native targets uncovered, such as darwin, but it
> should be easy to fix the build error.
I assume you mean "any build error", as you did touch darwin.
Could be helpful to put this in a test branch to make it super easy
for others to test.
> Patch 2 is major part of this
> series. Patch 3 adjusts linux_common_xfer_osdata and patch 4 adjusts
> two gdbarch methods.
>
> I tried to turn -Wconversion on to help me to check some signed/unsigned
> conversion, but it gives me thousands of errors in a clean build
> (without my patches. Looks signed/unsigned types are used freely in GDB
> code base, so I didn't take much care of signed/unsigned conversion.
>
> I'll finish the interface to_xfer_partial change in next step, and
> adjust its implementations on some targets, such as tfile and ctf
> targets.
>
> [1] supporting all kinds of partially-<unavailable> enum target_object types
> https://sourceware.org/ml/gdb-patches/2013-10/msg00761.html
Thanks a lot for following through with this!
--
Pedro Alves