gdb_server: drop useless check in gdb_keep_client_alive()
commit35e4c4616f5a924313e85290f56f84f7a8534801
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 25 Feb 2024 22:03:27 +0000 (25 23:03 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 24 Mar 2024 13:40:27 +0000 (24 13:40 +0000)
treea4f831896c169e992cce57c799512bb6fa24cef4
parent0c0243228cb958b7c12c2e5a81c84d35734fce25
gdb_server: drop useless check in gdb_keep_client_alive()

OpenOCD can send it's log to gdb, and gdb replies with 'OK'.
Calls to LOG_XXX() are also present in the code that communicates
with gdb. This can cause infinite nested calls.

OpenOCD uses the flag 'gdb_con->busy' to protect the communication
with gdb and prevent nested calls.

There is no reason to check for 'gdb_con->busy' in the code for
keep-alive, as keep_alive() is never called in this gdb server;
the flag would eventually be set if the current keep_alive() will
send something to gdb.

Drop the flag 'gdb_con->busy' in gdb_keep_client_alive().
While there, document the use of 'gdb_con->busy'.

Change-Id: I1ea20bf96abb5d2f1fcdba1e3861df257c396bb6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8166
Tested-by: jenkins
src/server/gdb_server.c