Fix kill of processes created by win32_create_inferior
authorHannes Domani <ssbssa@yahoo.de>
Sat, 8 Feb 2020 18:08:40 +0000 (19:08 +0100)
committerHannes Domani <ssbssa@yahoo.de>
Wed, 12 Feb 2020 16:11:45 +0000 (17:11 +0100)
handle_v_kill uses signal_pid because win32 doesn't support multi-process.

Without this gdb just refuses to kill the process:
(gdb) kill
Kill the program being debugged? (y or n) y
Sending packet: $vKill;a410#33...Packet received: E01
Packet vKill (kill) is supported
Can't kill process

gdbserver/ChangeLog:

2020-02-12  Hannes Domani  <ssbssa@yahoo.de>

* win32-low.c (win32_create_inferior): Set signal_pid.

gdbserver/ChangeLog
gdbserver/win32-low.c

index 709ef23674c4f85587531cb4b2afa79598737650..1f930c48ad230f4735a8dd07ff8c93224fe90d66 100644 (file)
@@ -1,3 +1,7 @@
+2020-02-12  Hannes Domani  <ssbssa@yahoo.de>
+
+       * win32-low.c (win32_create_inferior): Set signal_pid.
+
 2020-02-12  Maciej W. Rozycki <macro@wdc.com>
            Pedro Alves  <palves@redhat.com>
 
index 9d0343788f1532f5e011f8613eb766204e3ef66e..557c90d97c6b3c63b0295f9153f233b80260209a 100644 (file)
@@ -709,6 +709,9 @@ win32_create_inferior (const char *program,
      (assuming success).  */
   cs.last_ptid = win32_wait (ptid_t (current_process_id), &cs.last_status, 0);
 
+  /* Necessary for handle_v_kill.  */
+  signal_pid = current_process_id;
+
   return current_process_id;
 }