Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: trix@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: patch d10v sim large transfers.
Date: Thu, 13 Jun 2002 09:39:00 -0000	[thread overview]
Message-ID: <3D08CAB7.50201@cygnus.com> (raw)
In-Reply-To: <3D08C70D.4CB485D4@redhat.com>

> sim/d10v:
> 2002-06-13  Tom Rix  <trix@redhat.com>
> 
> 	* 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



  reply	other threads:[~2002-06-13 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-13  9:27 trix
2002-06-13  9:39 ` Andrew Cagney [this message]
2002-06-13  9:41 ` Frank Ch. Eigler
2002-06-13  9:59   ` trix

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=3D08CAB7.50201@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=trix@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