This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: patch d10v sim large transfers.
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: trix at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 13 Jun 2002 12:39:19 -0400
- Subject: Re: patch d10v sim large transfers.
- References: <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