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

[-- Attachment #1: Type: text/plain, Size: 146 bytes --]

The size is never decrements in xfer_mem.

If there are no objections,  I will commit this patch.

Tom

--
Tom Rix
GCC Engineer
trix@redhat.com



[-- Attachment #2: sim-d10v-seg-1001-fa.patch --]
[-- Type: text/plain, Size: 783 bytes --]

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;
 }
 
 

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-13  9:27 trix [this message]
2002-06-13  9:39 ` Andrew Cagney
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=3D08C70D.4CB485D4@redhat.com \
    --to=trix@redhat.com \
    --cc=gdb-patches@sources.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