aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorSandeep Mistry <s.mistry@arduino.cc>2015-12-23 12:10:32 -0500
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2016-10-17 09:11:10 +0100
commitca6ccad439f64870543c7955190a28a311ec341f (patch)
tree89298e9885cd2dedf26a939cc2bd8688a61bbb13 /src/server
parentf109a93075b746e2fc94e5fa1fbdaddb61d6326b (diff)
downloadriscv-openocd-ca6ccad439f64870543c7955190a28a311ec341f.zip
riscv-openocd-ca6ccad439f64870543c7955190a28a311ec341f.tar.gz
riscv-openocd-ca6ccad439f64870543c7955190a28a311ec341f.tar.bz2
gdb server: Add back support to disable the gdb server via the gdb_port config
As per the documentation, used "disabled" as the value to disable, as this is the same value to disable the telnet and tcl server. Change-Id: Idc4a8580098ec1107dcc6e1f59e817ecdebc38ac Signed-off-by: Sandeep Mistry <s.mistry@arduino.cc> Reviewed-on: http://openocd.zylin.com/3175 Tested-by: jenkins Reviewed-by: Cristian Maglie Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/server')
-rw-r--r--src/server/gdb_server.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c
index 4a18198..d09a8be 100644
--- a/src/server/gdb_server.c
+++ b/src/server/gdb_server.c
@@ -2921,6 +2921,11 @@ static int gdb_target_start(struct target *target, const char *port)
static int gdb_target_add_one(struct target *target)
{
+ if (strcmp(gdb_port, "disabled") == 0) {
+ LOG_INFO("gdb port disabled");
+ return ERROR_OK;
+ }
+
/* one gdb instance per smp list */
if ((target->smp) && (target->gdb_service))
return ERROR_OK;
@@ -3114,7 +3119,7 @@ static const struct command_registration gdb_command_handlers[] = {
"server listens for the next port number after the "
"base port number specified. "
"No arguments reports GDB port. \"pipe\" means listen to stdin "
- "output to stdout, an integer is base port number, \"disable\" disables "
+ "output to stdout, an integer is base port number, \"disabled\" disables "
"port. Any other string is are interpreted as named pipe to listen to. "
"Output pipe is the same name as input pipe, but with 'o' appended.",
.usage = "[port_num]",