Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | This problem was created by the upstream commit 78708b7c8c |
| 2 | After applying the commit, it will send SIGINT to the process group(-signal_pid). |
| 3 | But if we use gdbserver send SIGINT, and the attached process is not a process |
| 4 | group leader, then the "kill (-signal_pid, SIGINT)" returns error and fails to |
| 5 | interrupt the attached process. |
| 6 | |
| 7 | Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=18945] |
| 8 | |
| 9 | Author: Josh Gao |
| 10 | Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com> |
| 11 | |
| 12 | Index: gdb-8.2/gdb/gdbserver/linux-low.c |
| 13 | =================================================================== |
| 14 | --- gdb-8.2.orig/gdb/gdbserver/linux-low.c |
| 15 | +++ gdb-8.2/gdb/gdbserver/linux-low.c |
| 16 | @@ -5940,9 +5940,7 @@ linux_look_up_symbols (void) |
| 17 | static void |
| 18 | linux_request_interrupt (void) |
| 19 | { |
| 20 | - /* Send a SIGINT to the process group. This acts just like the user |
| 21 | - typed a ^C on the controlling terminal. */ |
| 22 | - kill (-signal_pid, SIGINT); |
| 23 | + kill (signal_pid, SIGINT); |
| 24 | } |
| 25 | |
| 26 | /* Copy LEN bytes from inferior's auxiliary vector starting at OFFSET |