From: Peter A. Bigot Date: Wed, 10 Aug 2016 21:54:00 +0000 (-0500) Subject: gdb_server: support disabling server X-Git-Tag: v0.10.0-rc1~123 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9c5529786aa46594fff0fcb63bc3b04a6e35f188;p=openocd gdb_server: support disabling server Although the documentation suggested this worked, and it is implemented for tcl_port and telnet_port, the directive was not recognized for gdb_port. Change-Id: I38d95ee879ec3f6d551603b7313749a21e0e498e Signed-off-by: Peter A. Bigot Reviewed-on: http://openocd.zylin.com/3637 Tested-by: jenkins Reviewed-by: Andreas Fritiofson --- diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 7d501b44..4a18198d 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2944,6 +2944,11 @@ static int gdb_target_add_one(struct target *target) int gdb_target_add_all(struct target *target) { + if (strcmp(gdb_port, "disabled") == 0) { + LOG_INFO("gdb server disabled"); + return ERROR_OK; + } + if (NULL == target) { LOG_WARNING("gdb services need one or more targets defined"); return ERROR_OK;