Confirmed, tmp is used as u32 in the following for loop.
The bug breaks the reg command and drscan out values (from Jim_Command_drscan ) but it should not affect an idcode scan. Patch applied. Regards, Magnus Andy chenee wrote: > hi: > > 1. for my test,the latest OpneOCD could not work well with TI beagleboard > ,post in : http://elinux.org/BeagleBoardOpenOCD > > 2. the svn version R1471 work fine but R1472 failed! > > 3. the output: > *Connected to localhost. > Escape character is '^]'. > Open On-Chip Debugger > >> jtag tapenable omap3.cpu >> > Enabling Cortex-A8 @ OMAP3 > Cortex-A8 @ OMAP3 enabled > 1 > >> irscan omap3.cpu 0xE >> drscan omap3.cpu 32 0x0 >> > 0B6D602F <==== (right,R1471) > 00000000 <==== (wrong,R1472) > * > 4. this is my patch, wish help. > -------------------------- begin ------------------- > diff --git a/src/helper/binarybuffer.c b/src/helper/binarybuffer.c > index a8be403..405e101 100644 > --- a/src/helper/binarybuffer.c > +++ b/src/helper/binarybuffer.c > @@ -244,7 +244,7 @@ char* buf_to_str(const u8 *buf, int buf_len, int radix) > int str_to_buf(const char *str, int str_len, u8 *buf, int buf_len, int > radix) > { > char *charbuf; > - char tmp; > + u32 tmp; > float factor; > u8 *b256_buf; > int b256_len; > @@ -303,7 +303,7 @@ int str_to_buf(const char *str, int str_len, u8 *buf, > int buf_len, int radix) > tmp = (tmp - 'A' + 10); > else continue; /* skip characters other than [0-9,a-f,A-F] > */ > > - if (tmp >= radix) > + if (tmp >= (u32)radix) > continue; /* skip digits invalid for the > current radix */ > > for (j = 0; j < b256_len; j++) > > > --------------------------- over -------------------- > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Openocd-development mailing list > Openocd-development@lists.berlios.de > https://lists.berlios.de/mailman/listinfo/openocd-development > _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development