ipdbg: simplify command chains

simplify ipdbg commands:
$hub_name ipdbg start -> $hub_name start

ipdbg/fix: While there, handle the multi-word deprecated commands
by adding quotes.

Change-Id: I5a56df2dbf2a5710442242727fa9384e5541ed53
Signed-off-by: Daniel Anselmi <danselmi@gmx.ch>
Fixes: https://sourceforge.net/p/openocd/tickets/434/
Reported-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8873
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
This commit is contained in:
Daniel Anselmi
2024-12-28 02:22:51 +01:00
committed by Antonio Borneo
parent 1afb3e75f0
commit 52ea420dd2
8 changed files with 29 additions and 41 deletions

View File

@@ -1205,7 +1205,7 @@ proc "pld device" {driver tap_name {opt 0}} {
lappend _telnet_autocomplete_skip "ipdbg -start"
proc "ipdbg -start" {args} {
echo "DEPRECATED! use 'ipdbg create-hub' and 'chip.ipdbghub ipdbg start ...', not 'ipdbg -start ...'"
echo "DEPRECATED! use 'ipdbg create-hub' and 'chip.ipdbghub start ...', not 'ipdbg -start ...'"
set tap_name ""
set pld_name ""
set tool_num "1"
@@ -1271,17 +1271,14 @@ proc "ipdbg -start" {args} {
return
}
echo "name: $hub_name"
echo "ipdbg create-hub $hub_name $args"
catch {eval ipdbg create-hub $hub_name $args}
eval $hub_name ipdbg start -tool $tool_num -port $port_num
eval $hub_name start -tool $tool_num -port $port_num
}
lappend _telnet_autocomplete_skip "ipdbg -stop"
proc "ipdbg -stop" {args} {
echo "DEPRECATED! use 'chip.ipdbghub ipdbg stop ...', not 'ipdbg -stop ...'"
echo "DEPRECATED! use 'chip.ipdbghub stop ...', not 'ipdbg -stop ...'"
set tap_name ""
set pld_name ""
set tool_num "1"
@@ -1328,7 +1325,11 @@ proc "ipdbg -stop" {args} {
return
}
eval $hub_name ipdbg stop -tool $tool_num
eval $hub_name stop -tool $tool_num
}
proc ipdbg {cmd args} {
tailcall "ipdbg $cmd" {*}$args
}
# END MIGRATION AIDS