]> git.sur5r.net Git - openocd/commit
gdb_server: add per target option "-gdb-port"
authorAntonio Borneo <borneo.antonio@gmail.com>
Mon, 21 May 2018 14:14:33 +0000 (16:14 +0200)
committerMatthias Welwarsky <matthias@welwarsky.de>
Fri, 7 Sep 2018 07:18:22 +0000 (08:18 +0100)
commitab858febb6ca6e5dada1492e96c00d8b12c575c0
tree6474d3e3a0861d717ce77baf53f4ebd797eec714
parent11019a824d0273012e9b253fd63ddda6a2468c83
gdb_server: add per target option "-gdb-port"

The argument passed to global config command "gdb_port" is usually,
but not always, a TCP port number. In case of multiple targets, this
numeric value is used as the first port of a set of consecutive TCP
ports assigned one per target.
If the argument is not a numeric value (e.g. "pipe", "disabled", ...)
then incrementing it for the next target has no sense.

Add the option "-gdb-port number" to the commands "target create" and
"$target_name configure" to override, for the specific target, the
general global configuration.

This permits to use a per target "-gdb-port disabled", when no gdb
port is required for that specific target.

It also makes possible to choose a custom TCP port number for each
target, overriding the usual sequence of consecutive port numbers.

Change-Id: I3b9a1910b28ab4bc757e839d0e5d08ffc29f7ab4
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/4530
Tested-by: jenkins
Reviewed-by: Christopher Head <chead@zaber.com>
Reviewed-by: Matthias Welwarsky <matthias@welwarsky.de>
doc/openocd.texi
src/server/gdb_server.c
src/target/target.c
src/target/target.h