This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix for follow-fork: followed child doesn't stop
- From: Pedro Alves <palves at redhat dot com>
- To: Don Breazeal <donb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Thu, 05 Jun 2014 13:52:20 +0100
- Subject: Re: [PATCH] Fix for follow-fork: followed child doesn't stop
- Authentication-results: sourceware.org; auth=none
- References: <1401920383-10219-1-git-send-email-donb at codesourcery dot com>
Hi Don,
On 06/04/2014 11:19 PM, Don Breazeal wrote:
> Using the test program gdb.base/foll-fork.c, with follow-fork-mode
> set to "child" and detach-on-fork set to "on", stepping past the
> fork call results in the child process running to completion, when
> it should just finish the single step.
>
> This is the result of how the single-step state is transferred from
> the parent to the child in infrun.c:follow_fork. For the parent, the
> single-step breakpoint is marked as "inserted" (bp->loc->inserted).
> The breakpoint is transferred to the child, where it clearly has never
> been inserted.
Was it removed from the parent already at this point? If so,
why is it still marked as inserted? If not, then it would sound
like your patch would make us miss removing it.
--
Pedro Alves