From: Hannes Domani Date: Sat, 8 Feb 2020 18:08:40 +0000 (+0100) Subject: Fix kill of processes created by win32_create_inferior X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=052793ad150643bd6cc34b02fc2a4fa0f5ec6428;p=binutils-gdb.git Fix kill of processes created by win32_create_inferior 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 * win32-low.c (win32_create_inferior): Set signal_pid. --- diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 709ef23674c..1f930c48ad2 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2020-02-12 Hannes Domani + + * win32-low.c (win32_create_inferior): Set signal_pid. + 2020-02-12 Maciej W. Rozycki Pedro Alves diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c index 9d0343788f1..557c90d97c6 100644 --- a/gdbserver/win32-low.c +++ b/gdbserver/win32-low.c @@ -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; }