openocd/src
Aurelien Jacobs 67c3ad8c40 at91sam7: ensure probed flash bank has a name (fix a segfault)
Before this commit, openocd used to segfault when probing flash
of an at91sam7x512 (which contains 2 banks of flash). This was due
to the way it systematically insert a new flash bank without setting
its name.
Then, when get_flash_bank_by_name_noprobe() is called, it is doing
a strcmp() on the non-initialized bank->name.

This commit prevents allocation of second probed bank if it is already
allocated (for example, if it is set in a target config file). If a
new bank really needs to be allocated, it ensures that a default name
is set.

Change-Id: I38d15bef1fda2ec746efad37171975136cf7b371
Signed-off-by: Aurelien Jacobs <aurel@gnuage.org>
Reviewed-on: http://openocd.zylin.com/171
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
2011-11-15 09:27:50 +00:00
..
flash at91sam7: ensure probed flash bank has a name (fix a segfault) 2011-11-15 09:27:50 +00:00
helper Fix "Evaluate 'script' in the global scope" 2011-10-24 17:40:52 +00:00
jtag ft2232: fix warning about assignment to local variable 2011-11-10 21:29:39 +00:00
pld Fix "unused variable" warnings (errors) detected with GCC 4.7.0 - trivial fixes 2011-06-04 09:35:13 +02:00
rtos ecos: add missing error propagation 2011-11-07 16:14:47 +00:00
server gdb_server: assert to avoid malloc(0) 2011-11-03 11:16:16 +00:00
svf svf: fix warnings 2011-11-10 15:43:30 +00:00
target target: make it absolutely clear that no null pointers are accepted 2011-11-14 23:39:20 +00:00
transport transport: move files over to transport folder 2011-06-13 15:51:04 +02:00
xsvf xsvf: add missing error propagation 2011-11-07 20:35:42 +00:00
ecosboard.c jim tests: use installed 2010-10-29 15:10:51 +02:00
hello.c HELLO: review unused symbols 2010-04-10 17:23:06 +08:00
hello.h HELLO: review unused symbols 2010-04-10 17:23:06 +08:00
main.c logging: turn of stdout/stderr buffering 2010-09-20 20:45:48 +02:00
Makefile.am ULINK driver: Add '-lm' linker flag when building this driver (required for correct calculation of JTAG TCK speed setting) 2011-08-31 16:25:42 +02:00
openocd.c replace berlios url's with sourceforge url's 2011-10-11 17:18:05 +01:00
openocd.h