This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Assertion 'xfered>0' in target.c for remote connection
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Paul Carroll <pcarroll at codesourcery dot com>, Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 14 Nov 2017 16:38:05 -0500
- Subject: Re: [PATCH] Assertion 'xfered>0' in target.c for remote connection
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=simon dot marchi at ericsson dot com;
- References: <1155839491.1748621.1509663923992.ref@mail.yahoo.com> <1155839491.1748621.1509663923992@mail.yahoo.com> <87lgjo6oqi.fsf@redhat.com> <b62b6cfa-ede8-b7bc-0254-e2eaf0effb98@codesourcery.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2017-11-14 10:02 AM, Paul Carroll wrote:
>>> We have a customer who is using a Corelis gdb server to connect to gdb.
>>> Occasionally, the gdb server will send a 0-byte block of memory for a read.
>>> When this happens, gdb gives an assertion from target.c:
>>>
>>> internal-error: target_xfer_partial: Assertion `*xfered_len > 0' failed.
>>>
>>> This problem is almost identical to that fixed in https://sourceware.org/ml/gdb-patches/2014-02/msg00636.html
>>>
>>> In this case, remote.c needs to be modified to return TARGET_XFER_EOF instead of TARGET_XFER_OK or TARGET_XFER_UNAVAILABLE when 0 bytes are transferred.
The patch look good to me, given that all other implementations do this.
It is small enough that it doesn't require a copyright assignment I think.
I see you have contributed to binutils in the past. Do you already have
push access to the binutils-gdb repo? If not we can push it for you, or
we can get you an account if you plan on contributing regularly.
Thanks,
Simon