public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Fix kill of processes created by win32_create_inferior
@ 2020-02-12 16:13 Hannes Domani
  0 siblings, 0 replies; only message in thread
From: Hannes Domani @ 2020-02-12 16:13 UTC (permalink / raw)
  To: bfd-cvs, gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=052793ad150643bd6cc34b02fc2a4fa0f5ec6428

commit 052793ad150643bd6cc34b02fc2a4fa0f5ec6428
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Sat Feb 8 19:08:40 2020 +0100

    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  <ssbssa@yahoo.de>
    
    	* win32-low.c (win32_create_inferior): Set signal_pid.

Diff:
---
 gdbserver/ChangeLog   | 4 ++++
 gdbserver/win32-low.c | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog
index 709ef23..1f930c4 100644
--- a/gdbserver/ChangeLog
+++ b/gdbserver/ChangeLog
@@ -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>
 
diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c
index 9d03437..557c90d 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;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-12 16:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 16:13 [binutils-gdb] Fix kill of processes created by win32_create_inferior Hannes Domani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).