This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Regression] Segfault on native-extended-gdbserver + fork


On 01/29/2018 05:03 PM, Simon Marchi wrote:
> On 2018-01-29 11:58, Pedro Alves wrote:
>> On 01/29/2018 04:25 PM, Simon Marchi wrote:
>>
>>> It's true that it's a bit of a lie to say "[Inferior PID detached]" if there never actually was an inferior for that PID.  Since we never print "[Inferior PID detached]" on native in that case, I am fine with removing the call from remote.c.  Sergio, that would fix the crash you found I think?
>>
>> A tangent:
>>
>> We should probably change that message from:
>>
>>  [Inferior PID detached]
>>
>> to something like:
>>
>>  [Inferior ID (process PID) detached]
>>
>> I.e.:
>>  [Inferior 24822 detached]
>> vs:
>>  [Inferior 1 (process 24822) detached]
>>
>> In patch form, something like this:
>>

> Agreed.  Though I don't think Sergio's original patch is needed if we instead remove the detach_inferior call in remote.c, so your patch shouldn't be based on his.

Yeah, my patch was a tangent / orthogonal to his regression fix.
It was against master.  I was thinking more about the whole
effort to enable "set print inferior-events" on by default
that Sergio is working on in context of:
<https://sourceware.org/ml/gdb-patches/2018-01/msg00531.html>

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]