This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: follow-fork and detach-on-fork should have one command
- From: Daniel Jacobowitz <drow at false dot org>
- To: PAUL GILLIAM <pgilliam at us dot ibm dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 10 Apr 2006 14:10:48 -0400
- Subject: Re: follow-fork and detach-on-fork should have one command
- References: <1144688788.10503.8.camel@dufur.beaverton.ibm.com>
On Mon, Apr 10, 2006 at 10:06:28AM -0700, PAUL GILLIAM wrote:
> Currently follow-fork is yes or no and detach-on-fork is yes or no.
>
> It seems to me that it would be clearer if there was only one, with
> three states "parent", "child", "both".
>
> Feel free to flame me if this has already been talked to death.
(gdb) set follow-fork-mode yes
Undefined item: "yes".
(gdb) set follow-fork-mode no
Undefined item: "no".
(gdb) help set follow-fork
Set debugger response to a program call of fork or vfork.
A fork or vfork creates a new process. follow-fork-mode can be:
parent - the original process is debugged after a fork
child - the new process is debugged after a fork
The unfollowed process will continue to run.
By default, the debugger will follow the parent process.
Once upon a time, there was a "both" item in this menu. It was
supposed to spawn two GDBs, one attached to each. I think
set detach-on-fork off is a reasonable behavior for "set follow-fork
both". Michael, how about you?
--
Daniel Jacobowitz
CodeSourcery