From 30e1d3ef8aaded9ee772136f6dc8bcf3fc8b5a7b Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Fri, 9 Jun 2023 15:33:14 +0200 Subject: [PATCH] tools/jlink.sh: start gdb server with setsid Adopted from openocd script in order to prevent killing the gdb server upon SIGINT. --- dist/tools/jlink/jlink.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dist/tools/jlink/jlink.sh b/dist/tools/jlink/jlink.sh index dead2babb1..5afc07f76e 100755 --- a/dist/tools/jlink/jlink.sh +++ b/dist/tools/jlink/jlink.sh @@ -65,6 +65,8 @@ : ${IMAGE_OFFSET:=0} # Allow overwriting the reset commands. : ${JLINK_RESET_FILE:=${RIOTTOOLS}/jlink/reset.seg} +# The setsid command is needed so that Ctrl+C in GDB doesn't kill OpenOCD +: ${SETSID:=setsid} # default GDB port _GDB_PORT=3333 @@ -239,7 +241,7 @@ do_debug() { test_tui test_dbg # start the J-Link GDB server - sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \ + ${SETSID} sh -c "${JLINK_SERVER} ${JLINK_SERIAL_SERVER} \ -nogui \ -silent \ -device '${JLINK_DEVICE}' \