This is an automated email from Gerrit.

Sergey A. Borshch ([email protected]) just uploaded a new patch set 
to Gerrit, which you can find at http://openocd.zylin.com/1679

-- gerrit

commit ddde6d94c5e27928bca0b38b2fd76b105e9d3e57
Author: Sergey A. Borshch <[email protected]>
Date:   Thu Oct 3 19:42:43 2013 +0300

    target: fix mem2array/array2mem
    
     if data size is bigger than transfer buffer, all portions are
     transferred from/to the same target address - address advance
     after successful transmission missed.
    
    Change-Id: I79a6c388af197ac062d2807e397a2d7947400520
    Signed-off-by: Sergey A. Borshch <[email protected]>

diff --git a/src/target/target.c b/src/target/target.c
index 68303bc..9c5ecda 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -3766,7 +3766,7 @@ static int target_mem2array(Jim_Interp *interp, struct 
target *target, int argc,
                                new_int_array_element(interp, varname, n, v);
                        }
                        len -= count;
-            addr += count;
+                       addr += count * len;
                }
        }
 
@@ -3960,7 +3960,7 @@ static int target_array2mem(Jim_Interp *interp, struct 
target *target,
                        e = JIM_ERR;
                        break;
                }
-        addr += count;
+               addr += count * width;
        }
 
        free(buffer);

-- 

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to