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: [PATCH] Fix for follow-fork: followed child doesn't stop


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


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