target/arm_tpiu: Fix 'tpiu create' parameter check
authorMarc Schink <dev@zapb.de>
Tue, 22 Jun 2021 10:59:01 +0000 (12:59 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 5 Mar 2022 13:23:33 +0000 (13:23 +0000)
commit4a4ca07da7b53e589afe2f79d03787d89faf1d33
tree3b8bd9755ca12d7e5f3c40804f9261ce572e5ac2
parent29e2a7451638d5706daf13b12211b49baafa3c42
target/arm_tpiu: Fix 'tpiu create' parameter check

The current implementation crashes when executing 'tpiu create'
without an object name due to an invalid memory access. Pass 'argv'
instead 'goi.argv' to fix the problem.

While at it, match the style of the error message to the style used for
other Tcl commands. Especially, make the 'name' parameter mandatory.

Change-Id: Ib2b233f8556934af61608ae93d6405585c2c40b7
Signed-off-by: Marc Schink <dev@zapb.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/6329
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
src/target/arm_tpiu_swo.c