patch d10v sim large transfers.
Andrew Cagney
ac131313@cygnus.com
Thu Jun 13 09:39:00 GMT 2002
> 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
More information about the Gdb-patches
mailing list