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: [RFA/Linux] Ask kernel to kill inferior when GDB terminates


On 11/14/2014 04:53 PM, Joel Brobecker wrote:
> Hello,
> 
> This patch enhances GDB on GNU/Linux systems to ask the kernel
> to kill the inferior if GDB terminates without doing it itself.
> This would typically happen when GDB encounters a problem and
> crashes, or when it gets killed by an external process. This can
> be observed by starting a program under GDB, and then killing
> GDB with signal 9. After GDB is killed, the inferior still remains
> in "interruptible sleep (waiting for an event to complete)" state.

I could see this making some sense when GDB has spawned the process,
but it seems harsh when GDB has attached to the process instead
of spawning it?

Note that Windows has had a similar feature for
ages (DebugSetProcessKillOnExit), and how windows-nat.c calls
DebugSetProcessKillOnExit(false) when GDB attaches to a process.

Thanks,
Pedro Alves


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