Skip to content

Commit 261fae5

Browse files
authored
Merge pull request #3 from sandeepmistry/gdb-port-disable
gdb server: Add back support to disable the gdb server via the gdb_port config
2 parents 688b0b6 + 3ba769f commit 261fae5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/server/gdb_server.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -2920,6 +2920,11 @@ static int gdb_target_start(struct target *target, const char *port)
29202920

29212921
static int gdb_target_add_one(struct target *target)
29222922
{
2923+
if (strcmp(gdb_port, "disabled") == 0) {
2924+
LOG_INFO("gdb port disabled");
2925+
return ERROR_OK;
2926+
}
2927+
29232928
/* one gdb instance per smp list */
29242929
if ((target->smp) && (target->gdb_service))
29252930
return ERROR_OK;
@@ -3108,7 +3113,7 @@ static const struct command_registration gdb_command_handlers[] = {
31083113
"server listens for the next port number after the "
31093114
"base port number specified. "
31103115
"No arguments reports GDB port. \"pipe\" means listen to stdin "
3111-
"output to stdout, an integer is base port number, \"disable\" disables "
3116+
"output to stdout, an integer is base port number, \"disabled\" disables "
31123117
"port. Any other string is are interpreted as named pipe to listen to. "
31133118
"Output pipe is the same name as input pipe, but with 'o' appended.",
31143119
.usage = "[port_num]",

0 commit comments

Comments
 (0)