0011-gdbserver-ctrl-c-handling.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 63df98fa78c8a6e12b40ebdc5c155838d2bf8b5f Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Thu, 29 Nov 2018 18:00:23 -0800
  4. Subject: [PATCH 11/11] gdbserver ctrl-c handling
  5. This problem was created by the upstream commit 78708b7c8c
  6. After applying the commit, it will send SIGINT to the process
  7. group(-signal_pid).
  8. But if we use gdbserver send SIGINT, and the attached process is not a
  9. process
  10. group leader, then the "kill (-signal_pid, SIGINT)" returns error and
  11. fails to
  12. interrupt the attached process.
  13. Upstream-Status: Submitted
  14. [https://sourceware.org/bugzilla/show_bug.cgi?id=18945]
  15. Author: Josh Gao
  16. Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
  17. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  18. ---
  19. gdbserver/linux-low.cc | 2 +-
  20. 1 file changed, 1 insertion(+), 1 deletion(-)
  21. diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc
  22. index e45493339d2..aabc099b456 100644
  23. --- a/gdbserver/linux-low.cc
  24. +++ b/gdbserver/linux-low.cc
  25. @@ -5714,7 +5714,7 @@ linux_process_target::request_interrupt ()
  26. {
  27. /* Send a SIGINT to the process group. This acts just like the user
  28. typed a ^C on the controlling terminal. */
  29. - ::kill (-signal_pid, SIGINT);
  30. + ::kill (signal_pid, SIGINT);
  31. }
  32. bool
  33. --
  34. 2.29.2