This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/Linux] Ask kernel to kill inferior when GDB terminates
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 19 Nov 2014 13:25:47 +0400
- Subject: Re: [RFA/Linux] Ask kernel to kill inferior when GDB terminates
- Authentication-results: sourceware.org; auth=none
- References: <1415984034-27122-1-git-send-email-brobecker at adacore dot com> <54663729 dot 6010708 at redhat dot com> <20141114173255 dot GD5774 at adacore dot com>
> > 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?
>
> Hmmm, good point. I'd like to verify what happens in that case, and
> whether the process remains stopped or if execution resumes in that
> case.
I took a little bit of time to experiment today. The experimentation
was conducted with Linux 3.13.0-39-generic from x86_64 Ubuntu.
In both cases, when GDB runs the program or attaches to a program,
killing GDB while the inferior is still running detaches GDB from
the inferior, which means it keeps running.
I will adapt my patch when I have a moment.
--
Joel