From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17010 invoked by alias); 13 Jun 2002 16:39:18 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16995 invoked from network); 13 Jun 2002 16:39:16 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 13 Jun 2002 16:39:16 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id C32563CA6; Thu, 13 Jun 2002 12:39:19 -0400 (EDT) Message-ID: <3D08CAB7.50201@cygnus.com> Date: Thu, 13 Jun 2002 09:39:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc3) Gecko/20020530 X-Accept-Language: en-us, en MIME-Version: 1.0 To: trix@redhat.com Cc: gdb-patches@sources.redhat.com Subject: Re: patch d10v sim large transfers. References: <3D08C70D.4CB485D4@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-06/txt/msg00215.txt.bz2 > sim/d10v: > 2002-06-13 Tom Rix > > * interp.c (xfer_mem): Fix transfers across multiple segments. > > Index: sim/d10v/interp.c > =================================================================== > RCS file: /cvs/src/src/sim/d10v/interp.c,v > retrieving revision 1.11 > diff -d -u -p -r1.11 interp.c > --- sim/d10v/interp.c 9 Jun 2002 15:45:46 -0000 1.11 > +++ sim/d10v/interp.c 13 Jun 2002 16:18:34 -0000 > @@ -715,7 +715,7 @@ xfer_mem (SIM_ADDR virt, > { > int xfered = 0; > > - while (xfered < size) > + while (0 < size) > { > uint8 *memory; > unsigned long phys; > @@ -754,9 +754,10 @@ xfer_mem (SIM_ADDR virt, > virt += phys_size; > buffer += phys_size; > xfered += phys_size; > + size -= phys_size; > } > > - return size; > + return xfered; > } Is the problem fixed if, instead, you do a short/partial read (eliminating the loop?). Andrew