From 9d2d268c97cb5bcbe5ee8f9dac1ce67a8c058c9c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 5 Nov 2012 18:56:43 +0000 Subject: gdb/ 2012-11-05 Pedro Alves * inferior.c (exit_inferior_1): Clear 'vfork_parent' in the vfork child. Clear 'pending_detach'. * infrun.c (handle_vfork_child_exec_or_exit): Clear 'pending_detach' in the vfork parent. gdb/testsuite/ 2012-11-05 Pedro Alves * gdb.base/foll-vfork.exp (vfork_relations_in_info_inferiors): New procedure. (do_vfork_and_follow_child_tests_exec) (do_vfork_and_follow_child_tests_exit): Call it. --- gdb/infrun.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/infrun.c') diff --git a/gdb/infrun.c b/gdb/infrun.c index ab5aacf584d..3d6eccd830f 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -663,6 +663,8 @@ handle_vfork_child_exec_or_exit (int exec) /* follow-fork child, detach-on-fork on. */ + inf->vfork_parent->pending_detach = 0; + if (!exec) { /* If we're handling a child exit, then inferior_ptid -- cgit v1.2.1