]> code.ossystems Code Review - openembedded-core.git/commit
gdb: gdbserver: update ctrl-c handling
authorZhixiong Chi <zhixiong.chi@windriver.com>
Wed, 19 Sep 2018 02:26:35 +0000 (19:26 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Sep 2018 12:41:25 +0000 (05:41 -0700)
commit435f671981a090bd06e8f3bf3436d58d531afd49
treee6e58387018188f45c3452cecf3fcbfeaa5650f7
parentb76903b4b7bfec71be0a8a14e2cab4e2ec852222
gdb: gdbserver: update ctrl-c handling

A) gdbserver sends SIGINT not to the process, but to the process
group (-signal_pid). But the attached process is not always a
process group leader. If not, "kill (-signal_pid, SIGINT)" returns
error and fails to interrupt the attached process. We cannot interrupt
the process attached with gdbserver who is not a process group leader.

This problem was created by the gdb upstream commit 78708b7c8c
The commit fixed the following case B) bug.
B) We cannot interrupt the process attached with gdbserver whose
main thread exits (pthread_exit()).

Now this patch can solve both A) and B).

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/gdb/gdb-8.2.inc
meta/recipes-devtools/gdb/gdb/gdbserver-ctrl-c-handling.patch [new file with mode: 0644]