tcl/drscan: handle invalid syntax with a conditional, not assert
commitbb0ef230ca707252cbab93f1eb944b284a3c1e1d
authorPaul Fertser <fercerpav@gmail.com>
Tue, 4 Feb 2014 12:07:57 +0000 (4 16:07 +0400)
committerSpencer Oliver <spen@spen-soft.co.uk>
Mon, 24 Feb 2014 12:01:52 +0000 (24 12:01 +0000)
tree9b9f8ebc301b6b1791a9639c559dadaa76857199
parent98b808923fbcf806f71aa256684407051008ef03
tcl/drscan: handle invalid syntax with a conditional, not assert

When "drscan" command is used improperly, such as in:
drscan stm32f1x.cpu -endstate drpause
there're no fields to scan, and so the assert leads to a
segfault. This should be treated like any other syntax error instead.

Change-Id: Id1743f5d641038e1e3754c6f3097aabc5d1916b9
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/1927
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/tcl.c