Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@ericsson.com>
To: Paul Carroll <pcarroll@codesourcery.com>,
	Sergio Durigan Junior	<sergiodj@redhat.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Assertion 'xfered>0' in target.c for remote connection
Date: Tue, 14 Nov 2017 21:38:00 -0000	[thread overview]
Message-ID: <9030ce55-663c-bfac-7586-dd1934190815@ericsson.com> (raw)
In-Reply-To: <b62b6cfa-ede8-b7bc-0254-e2eaf0effb98@codesourcery.com>

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


  parent reply	other threads:[~2017-11-14 21:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1155839491.1748621.1509663923992.ref@mail.yahoo.com>
2017-11-02 23:05 ` pcarroll
2017-11-03  3:11   ` Sergio Durigan Junior
     [not found]     ` <b62b6cfa-ede8-b7bc-0254-e2eaf0effb98@codesourcery.com>
2017-11-14 21:38       ` Simon Marchi [this message]
2017-11-14 22:08         ` Yao Qi
2017-11-14 22:30         ` Paul Carroll
2017-11-14 22:41           ` Simon Marchi
2017-11-03 20:36 Carroll, Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9030ce55-663c-bfac-7586-dd1934190815@ericsson.com \
    --to=simon.marchi@ericsson.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pcarroll@codesourcery.com \
    --cc=sergiodj@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox