This is an automated email from Gerrit. "Jan Matyas <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/9727
-- gerrit commit d19ab4ae8200924f4545de11be0d53c12a3f45cc Author: Jan Matyas <[email protected]> Date: Wed Jun 3 12:59:39 2026 +0200 gdb_server: Log async notifications sent back to GDB All packets sent to gdb-remote clients are currently logged (with the "debug" verbosity), except for asynchronous notifications, introduced in [1]. Add logging of these notification packets, too. Having a complete and reliable log of the messages exchanged between OpenOCD and the debugger (GDB/LLDB) is important for troubleshooting issues like [2]. [1] https://review.openocd.org/c/openocd/+/8165 [2] https://github.com/llvm/llvm-project/issues/197944 Change-Id: Ib95421c7864150d831df97eb0d76b1250e8fb98e Signed-off-by: Jan Matyas <[email protected]> diff --git a/src/server/gdb_server.c b/src/server/gdb_server.c index f59eb5029e..de988ee562 100644 --- a/src/server/gdb_server.c +++ b/src/server/gdb_server.c @@ -426,6 +426,19 @@ static void gdb_log_outgoing_packet(struct connection *connection, const char *p gdb_connection->unique_index, packet_len, packet_buf, checksum); } +static void gdb_log_outgoing_async_notif(struct connection *connection, const char *buf, + unsigned int len) +{ + if (!LOG_LEVEL_IS(LOG_LVL_DEBUG)) + return; + + struct target *target = get_target_from_connection(connection); + struct gdb_connection *gdb_connection = connection->priv; + + LOG_TARGET_DEBUG(target, "{%d} sending packet: %.*s", + gdb_connection->unique_index, len, buf); +} + static int gdb_put_packet_inner(struct connection *connection, const char *buffer, int len) { @@ -3873,6 +3886,7 @@ static void gdb_async_notif(struct connection *connection) LOG_DEBUG("sending packet '%s'", buf); #endif + gdb_log_outgoing_async_notif(connection, buf, len); gdb_write(connection, buf, len); } --
