|
From: <ge...@op...> - 2025-11-29 10:02:16
|
This is an automated email from Gerrit. "Tomas Vanek <va...@fb...>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9272 -- gerrit commit 3efc0fa67a4c731a96b3b67164b6eeed81b1ea6c Author: Tomas Vanek <va...@fb...> Date: Sat Nov 29 09:37:58 2025 +0100 gdb_server: preserve gdb monitor command output from Tcl events target_call_timer_callbacks_now() in gdb_query_packet() may result in Tcl event execution. The event output replaces the desired command output. Call target_call_timer_callbacks_now() as late as Tcl return message of monitor command is gathered. Change-Id: Id1c2304fc9b218ceade02e9ae8eff5bd814baa38 Signed-off-by: Tomas Vanek <va...@fb...> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index a989bda578..b7ac8f257d 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -2822,7 +2822,6 @@ static int gdb_query_packet(struct connection *connection, cmd_ctx->current_target_override = saved_target_override; current_gdb_connection = NULL; - target_call_timer_callbacks_now(); gdb_connection->output_flag = GDB_OUTPUT_NO; free(cmd); if (retval == JIM_RETURN) @@ -2836,6 +2835,9 @@ static int gdb_query_packet(struct connection *connection, } else { retmsg = strdup(cretmsg); } + + target_call_timer_callbacks_now(); + if (!retmsg) return ERROR_GDB_BUFFER_TOO_SMALL; -- |