aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v
diff options
context:
space:
mode:
authorTom Rix <trix@redhat.com>2002-06-15 11:01:34 +0000
committerTom Rix <trix@redhat.com>2002-06-15 11:01:34 +0000
commit3d2957e64ee7ea47e2903e9e63f807fd10f3b9cb (patch)
treea91e4594353dcb1421b9cbc2c52e36c04141fdd3 /sim/d10v
parente75700dfba681d16e0598f8b120319387bb41ab0 (diff)
downloadgdb-3d2957e64ee7ea47e2903e9e63f807fd10f3b9cb.zip
gdb-3d2957e64ee7ea47e2903e9e63f807fd10f3b9cb.tar.gz
gdb-3d2957e64ee7ea47e2903e9e63f807fd10f3b9cb.tar.bz2
Fix for transfers across segments.
Diffstat (limited to 'sim/d10v')
-rw-r--r--sim/d10v/ChangeLog4
-rw-r--r--sim/d10v/interp.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 91d71f3..b5343d6 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,7 @@
+2002-06-13 Tom Rix <trix@redhat.com>
+
+ * interp.c (xfer_mem): Fix transfers across multiple segments.
+
2002-06-09 Andrew Cagney <cagney@redhat.com>
* Makefile.in (INCLUDE): Update path to callback.h.
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index e465a80..0f7295d 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -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;
}