Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix kill of processes created by win32_create_inferior
       [not found] <20200208182539.5775-1-ssbssa.ref@yahoo.de>
@ 2020-02-08 18:26 ` Hannes Domani via gdb-patches
  2020-02-10 22:33   ` Luis Machado
  0 siblings, 1 reply; 4+ messages in thread
From: Hannes Domani via gdb-patches @ 2020-02-08 18:26 UTC (permalink / raw)
  To: gdb-patches

handle_v_kill uses signal_pid because win32 doesn't support multi-process.

gdbserver/ChangeLog:

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

	* win32-low.c (win32_create_inferior): Set signal_pid.
---
 gdbserver/win32-low.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c
index 9d0343788f..557c90d97c 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;
 }
 
-- 
2.25.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix kill of processes created by win32_create_inferior
  2020-02-08 18:26 ` [PATCH] Fix kill of processes created by win32_create_inferior Hannes Domani via gdb-patches
@ 2020-02-10 22:33   ` Luis Machado
  2020-02-12  4:18     ` Simon Marchi
  0 siblings, 1 reply; 4+ messages in thread
From: Luis Machado @ 2020-02-10 22:33 UTC (permalink / raw)
  To: Hannes Domani, gdb-patches

On 2/8/20 3:25 PM, Hannes Domani via gdb-patches wrote:
> handle_v_kill uses signal_pid because win32 doesn't support multi-process.
> 
> gdbserver/ChangeLog:
> 
> 2020-02-08  Hannes Domani  <ssbssa@yahoo.de>
> 
> 	* win32-low.c (win32_create_inferior): Set signal_pid.
> ---
>   gdbserver/win32-low.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c
> index 9d0343788f..557c90d97c 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;
>   }
>   
> 

Thanks. This one looks OK to me.

It would be nice to augment the description with what situation this 
fixes. I suppose it doesn't kill the process properly?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix kill of processes created by win32_create_inferior
  2020-02-10 22:33   ` Luis Machado
@ 2020-02-12  4:18     ` Simon Marchi
  2020-02-12  4:57       ` Simon Marchi
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2020-02-12  4:18 UTC (permalink / raw)
  To: Luis Machado, Hannes Domani, gdb-patches

On 2020-02-10 5:33 p.m., Luis Machado wrote:
> On 2/8/20 3:25 PM, Hannes Domani via gdb-patches wrote:
>> handle_v_kill uses signal_pid because win32 doesn't support multi-process.
>>
>> gdbserver/ChangeLog:
>>
>> 2020-02-08  Hannes Domani  <ssbssa@yahoo.de>
>>
>> 	* win32-low.c (win32_create_inferior): Set signal_pid.
>> ---
>>   gdbserver/win32-low.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c
>> index 9d0343788f..557c90d97c 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;
>>   }
>>   
>>
> 
> Thanks. This one looks OK to me.
> 
> It would be nice to augment the description with what situation this 
> fixes. I suppose it doesn't kill the process properly?

Agreed.  The patch looks ok, as far as I understand, but it would be good to
explain in the commit message what's the bug, how you provoke it, how the new
behavior differs from the previous behavior.

Simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix kill of processes created by win32_create_inferior
  2020-02-12  4:18     ` Simon Marchi
@ 2020-02-12  4:57       ` Simon Marchi
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Marchi @ 2020-02-12  4:57 UTC (permalink / raw)
  To: Luis Machado, Hannes Domani, gdb-patches

On 2020-02-11 11:18 p.m., Simon Marchi wrote:
> On 2020-02-10 5:33 p.m., Luis Machado wrote:
>> On 2/8/20 3:25 PM, Hannes Domani via gdb-patches wrote:
>>> handle_v_kill uses signal_pid because win32 doesn't support multi-process.
>>>
>>> gdbserver/ChangeLog:
>>>
>>> 2020-02-08  Hannes Domani  <ssbssa@yahoo.de>
>>>
>>> 	* win32-low.c (win32_create_inferior): Set signal_pid.
>>> ---
>>>   gdbserver/win32-low.c | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/gdbserver/win32-low.c b/gdbserver/win32-low.c
>>> index 9d0343788f..557c90d97c 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;
>>>   }
>>>   
>>>
>>
>> Thanks. This one looks OK to me.
>>
>> It would be nice to augment the description with what situation this 
>> fixes. I suppose it doesn't kill the process properly?
> 
> Agreed.  The patch looks ok, as far as I understand, but it would be good to
> explain in the commit message what's the bug, how you provoke it, how the new
> behavior differs from the previous behavior.
> 
> Simon
> 

Sorry, I just saw that you have already posted a v2, I'll at it now.

Simon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-12  4:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200208182539.5775-1-ssbssa.ref@yahoo.de>
2020-02-08 18:26 ` [PATCH] Fix kill of processes created by win32_create_inferior Hannes Domani via gdb-patches
2020-02-10 22:33   ` Luis Machado
2020-02-12  4:18     ` Simon Marchi
2020-02-12  4:57       ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox