This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/6] Return early in target_xfer_partial when LEN is zero.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 06 Feb 2014 14:44:11 +0000
- Subject: Re: [PATCH 4/6] Return early in target_xfer_partial when LEN is zero.
- Authentication-results: sourceware.org; auth=none
- References: <1391139325-2758-1-git-send-email-yao at codesourcery dot com> <1391139325-2758-5-git-send-email-yao at codesourcery dot com>
On 01/31/2014 03:35 AM, Yao Qi wrote:
> Nowadays, argument LEN of to_xfer_partial can be zero in some cases,
> and each implementation may do nothing and return zero, indicating
> transfer is done. That is fine. However, when we change
> to_xfer_partial to return target_xfer_status, we have to check every
> return value of most of to_xfer_partial implementations, return
> TARGET_XFER_DONE if return value is zero.
>
> This patch simplifies this by checking LEN in target_xfer_partial, and
> return 0 if LEN is zero. Regression tested on x86_84-linux. Is it
> OK?
OK. Thanks.
--
Pedro Alves