aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorChristopher Head <chead@zaber.com>2018-10-18 14:20:45 -0700
committerTomas Vanek <vanekt@fbl.cz>2018-11-13 07:02:58 +0000
commitea41048830f3ef79129fdbf3623d708585929f5b (patch)
tree8a9ee38a7a190a32a79ae2ca21da407cb5289618 /contrib
parent8d914e4d97df45b72fbb6919af1d276f3f69c6f3 (diff)
downloadriscv-openocd-ea41048830f3ef79129fdbf3623d708585929f5b.zip
riscv-openocd-ea41048830f3ef79129fdbf3623d708585929f5b.tar.gz
riscv-openocd-ea41048830f3ef79129fdbf3623d708585929f5b.tar.bz2
Permit null target on TCL connection
In previous versions of OpenOCD, it was possible to connect to the TCL RPC interface without a current target. In `tcl_new_connection`, the curent target would be queried by number, and the possibility of a null current target was handled properly. In commit bb9d9c60264a905926e0d15f84842858d0de80b7, the `get_target_by_num` call was replaced by a `get_current_target` call, without noticing that `get_current_target` aborts if there is no current target, whereas `tcl_new_connection` is perfectly able to handle that situation. Provide a `get_current_target_or_null` function for use by consumers who are OK with a null current target, and use it in `tcl_new_connection`. Change-Id: I06f7e1e149f1169e23c73ba328c7ad9f9425cc2a Signed-off-by: Christopher Head <chead@zaber.com> Reviewed-on: http://openocd.zylin.com/4730 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-by: Franck Jullien <franck.jullien@gmail.com>
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions