On Thu, Mar 15, 2012 at 6:44 PM, salvador <salva...@telecable.es> wrote: > On 03/14/2012 07:24 PM, salvador wrote: > 1.- There is no call to mips32_pracc_read_mem32() in > mips_m4k_read_memory(). Yes, there is. It is called implicitly, by mips32_pracc_read_mem(). Anyway, count parameter is propagated. Looking in the mips_m4k_read_memory() you can easily see that it is used to count __BYTES__ :
t = malloc(count * size * sizeof(uint8_t)); > 2.- I guess you mean a call to mips32_pracc_read_mem(). This function > has a parameter "int size". Yes. Size of variable does not meter. It is a placeholder for integer - a number. This number, however, can be a number of apples, ducks or, as in this case - bytes. > > 3.- The function mips32_pracc_read_mem() is defined in mips32_pracc.c > . This function calls mips32_pracc_read_mem32() only if the > parameter size is 4 (WORD) and count >1. Yes. 'size' is the "acces width" : w, hw or b. Independantly, 'count' is nb of bytes. 'size' parameter is used in the switch in mips32_pracc_read_mem() in order to call correct miniprogram - one that reads w, hw or b. > 4.- In function mips32_pracc_read_mem32(), in the call to > mips32_pracc_exec() the variable bytesread is used as an index in a > matrix of uint32_t (WORDS). > > > Sorry but i can not find anything in the code that says "bytesread" or > "count" counts bytes. But WORDS, yes. Sorry, but everything is there, written black on white (or whatever syntax coloring you use ;)). You'll just have to inspect the code more carefully and follow the call graph. Use cscope, if that will help you. As a hint follow the propagation of "count" parameter - find it's origin and you'll see that it holds a nb of octets. 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