This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Refuse following the vfork parent if not letting the child run.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 8 Jun 2009 10:31:11 -0400
- Subject: Re: Refuse following the vfork parent if not letting the child run.
- References: <200906081431.38913.pedro@codesourcery.com>
On Mon, Jun 08, 2009 at 02:31:38PM +0100, Pedro Alves wrote:
> A patched GDB shows this:
>
> (gdb) set detach-on-fork off
> (gdb) start
> Temporary breakpoint 1 at 0x4005c0: file ../../../src/gdb/testsuite/gdb.base/foll-vfork.c, line 12.
> Starting program: /home/pedro/gdb/sspaces/build/gdb/testsuite/gdb.base/foll-vfork
>
> Temporary breakpoint 1, main () at ../../../src/gdb/testsuite/gdb.base/foll-vfork.c:12
> 12 pid = vfork ();
> (gdb) n
> warning: Can not debug the parent of a vfork in the foreground if not letting
> the child run until it execs or exits, as it would deadlock the terminal.
> 0x00007ffff789aee4 in vfork () from /lib/libc.so.6
> (gdb)
None of your explanation, the patch, or the example output tells me
what GDB is doing instead :-) IOW, I think a "warning" about the
situation here is strange; something has happened, and we don't say
what.
Is this actually a fork-following error, and we've stopped execution?
--
Daniel Jacobowitz
CodeSourcery