Hi Salvador, On Wed, Mar 14, 2012 at 7:24 PM, salvador <salva...@telecable.es> wrote: > Hello > > If i try the command " mdw addr n " with n greater than 1024 the data > displayed is wrong from 1025 onward.
I'll have to check this... There is really no need for this behavior. <code> blocksize = count; if (count > 0x400) blocksize = 0x400; </code> ensures that we read 1024 bytes per processor access (dunno why, probably realated to EJTAG memory). N.B. "count is really a number of bytes - look at mips_m4k_read_memory() which calls mips32_pracc_read_mem32(). However, this is executed within a while (count > 0) loop, i.e. while all the bytes have been read. Why is this looping commented for half-word and byte accesses I can not tell (and is probably wrong). > The bug is located in mips32_pracc.c, in function mips32_pracc_read_mem32 > > > About line 364: > > > count -= blocksize; > addr += blocksize; > bytesread += blocksize; > > > Should be: > > count -= blocksize; > addr += blocksize * sizeof(uint32_t); > bytesread += blocksize; No, it should be as it is. > > " bytesread " is a variable that counts words.... A little confusing, > isn't it? As the name indicates, bytesread is the number of bytes read. BR, Drasko ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel