From: openocd-gerrit <ope...@us...> - 2024-06-08 08:51:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ed9203f4aaf3b4a28d5e28da2cdb1a52d9f7c408 (commit) from 1fba55a9b62118ac102c161bb8efcd2ceed379a1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ed9203f4aaf3b4a28d5e28da2cdb1a52d9f7c408 Author: Paul Fertser <fer...@gm...> Date: Thu Apr 25 14:33:07 2024 +0300 gdb_server: do not start multiple instances on "pipe" For configurations which include multiple targets and the "pipe" mode is requested only the first gdb_server instance should be enabled, otherwise GDB gets confusing replies, goes out of sync and the session fails in weird ways. Compile-tested only. Signed-off-by: Paul Fertser <fer...@gm...> Change-Id: If8f13aa7b58e9b0dc6d5ae88cf75538b34cc1218 Reviewed-on: https://review.openocd.org/c/openocd/+/8222 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index 7c2f41e41..0ded8e440 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -3879,7 +3879,7 @@ static int gdb_target_add_one(struct target *target) return gdb_target_start(target, target->gdb_port_override); } - if (strcmp(gdb_port, "disabled") == 0) { + if (strcmp(gdb_port_next, "disabled") == 0) { LOG_INFO("gdb port disabled"); return ERROR_OK; } @@ -3908,6 +3908,8 @@ static int gdb_target_add_one(struct target *target) gdb_port_next = strdup("0"); } } + } else if (strcmp(gdb_port_next, "pipe") == 0) { + gdb_port_next = "disabled"; } } return retval; ----------------------------------------------------------------------- Summary of changes: src/server/gdb_server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) hooks/post-receive -- Main OpenOCD repository |