From 4d664f9e054ce16c2dc54fb25559891c364e823f Mon Sep 17 00:00:00 2001 From: redoste Date: Sun, 31 Mar 2024 18:23:52 +0200 Subject: [PATCH] gdb: ignore SIGINT from the bridge when gdb is in foreground ^C can be used within gdb to break a running target, handeling it from the bridge would kill the connection --- fxsdk/gdb-bridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fxsdk/gdb-bridge.c b/fxsdk/gdb-bridge.c index 735aaec..e6cd59a 100644 --- a/fxsdk/gdb-bridge.c +++ b/fxsdk/gdb-bridge.c @@ -228,7 +228,7 @@ int main(int argc, char **argv) goto end; struct sigaction action = { - .sa_handler = SIGINT_SIGCHLD_handler, + .sa_handler = opts.bridge_only ? SIGINT_SIGCHLD_handler : SIG_IGN, }; sigaction(SIGINT, &action, NULL);