From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49582 invoked by alias); 14 Nov 2017 22:30:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 49525 invoked by uid 89); 14 Nov 2017 22:30:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KB_WAM_FROM_NAME_SINGLEWORD,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=Siemens, regularly, Hard, H*u:6.1 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 14 Nov 2017 22:30:24 +0000 Received: from svr-orw-mbx-04.mgc.mentorg.com ([147.34.90.204]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eEjim-00017y-VU from Paul_Carroll@mentor.com ; Tue, 14 Nov 2017 14:30:20 -0800 Received: from [172.30.88.65] (147.34.91.1) by SVR-ORW-MBX-04.mgc.mentorg.com (147.34.90.204) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Tue, 14 Nov 2017 14:30:18 -0800 Subject: Re: [PATCH] Assertion 'xfered>0' in target.c for remote connection To: Simon Marchi , Sergio Durigan Junior CC: "gdb-patches@sourceware.org" References: <1155839491.1748621.1509663923992.ref@mail.yahoo.com> <1155839491.1748621.1509663923992@mail.yahoo.com> <87lgjo6oqi.fsf@redhat.com> <9030ce55-663c-bfac-7586-dd1934190815@ericsson.com> From: Paul Carroll Message-ID: <44698d0e-9426-7f48-8226-aa4eec0462b1@codesourcery.com> Date: Tue, 14 Nov 2017 22:30:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9030ce55-663c-bfac-7586-dd1934190815@ericsson.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) To SVR-ORW-MBX-04.mgc.mentorg.com (147.34.90.204) X-SW-Source: 2017-11/txt/msg00260.txt.bz2 On 11/14/2017 4:38 PM, Simon Marchi wrote: > 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. > Please feel free to push the patch for me. Hard to say how regularly I will be patching things. The copyright assignment, as Yao noted, is covered by Mentor Graphics (and Siemens).