aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch
blob: 71fe7f83b65e05107ff2fd9b74c766b5082bc599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
This problem was created by the upstream commit 78708b7c8c
After applying the commit, it will send SIGINT to the process group(-signal_pid).
But if we use gdbserver send SIGINT, and the attached process is not a process
group leader, then the "kill (-signal_pid, SIGINT)" returns error and fails  to
interrupt the attached process.

Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=18945]

Author: Josh Gao
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>

Index: gdb-8.2/gdb/gdbserver/linux-low.c
===================================================================
--- gdb-8.2.orig/gdb/gdbserver/linux-low.c
+++ gdb-8.2/gdb/gdbserver/linux-low.c
@@ -5940,9 +5940,7 @@ linux_look_up_symbols (void)
 static void
 linux_request_interrupt (void)
 {
-  /* Send a SIGINT to the process group.  This acts just like the user
-     typed a ^C on the controlling terminal.  */
-  kill (-signal_pid, SIGINT);
+  kill (signal_pid, SIGINT);
 }
 
 /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET