Fix for transfers across segments.
This commit is contained in:
parent
e75700dfba
commit
3d2957e64e
2 changed files with 7 additions and 2 deletions
|
@ -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>
|
2002-06-09 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
* Makefile.in (INCLUDE): Update path to callback.h.
|
* Makefile.in (INCLUDE): Update path to callback.h.
|
||||||
|
|
|
@ -715,7 +715,7 @@ xfer_mem (SIM_ADDR virt,
|
||||||
{
|
{
|
||||||
int xfered = 0;
|
int xfered = 0;
|
||||||
|
|
||||||
while (xfered < size)
|
while (0 < size)
|
||||||
{
|
{
|
||||||
uint8 *memory;
|
uint8 *memory;
|
||||||
unsigned long phys;
|
unsigned long phys;
|
||||||
|
@ -754,9 +754,10 @@ xfer_mem (SIM_ADDR virt,
|
||||||
virt += phys_size;
|
virt += phys_size;
|
||||||
buffer += phys_size;
|
buffer += phys_size;
|
||||||
xfered += phys_size;
|
xfered += phys_size;
|
||||||
|
size -= phys_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
return size;
|
return xfered;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue