From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7101 invoked by alias); 6 Oct 2014 12:41:34 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 7080 invoked by uid 48); 6 Oct 2014 12:41:34 -0000 From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/13457] `catch syscall' doesn't work for parent after `fork' is called Date: Mon, 06 Oct 2014 12:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: palves at redhat dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: sergiodj at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-q4/txt/msg00023.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=13457 --- Comment #3 from Pedro Alves --- While following the parent happened to get fixed by that patch, following the child when we stay attached to the parent is not. E.g., gdb -q ./testsuite/gdb.base/foll-fork -ex "set follow-fork child" -ex "set detach-on-fork off" Reading symbols from ./testsuite/gdb.base/foll-fork...done. (gdb) catch fork Catchpoint 1 (fork) (gdb) r Starting program: testsuite/gdb.base/foll-fork Catchpoint 1 (forked process 2045), 0x00000033356bc87c in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/fork.c:130 130 pid = ARCH_FORK (); (gdb) catch syscall Catchpoint 2 (any syscall) (gdb) c Continuing. [New process 2045] [Inferior 2 (process 2045) exited normally] (gdb) vs: $ gdb -q ./testsuite/gdb.base/foll-fork -ex "set follow-fork child" -ex "set detach-on-fork on" ... Catchpoint 1 (forked process 2084), 0x00000033356bc87c in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/fork.c:130 130 pid = ARCH_FORK (); (gdb) catch syscall Catchpoint 2 (any syscall) (gdb) c Continuing. [New process 2084] Catchpoint 2 (call to syscall exit_group), 0x00000033356bcaf9 in __GI__exit (status=status@entry=0) at ../sysdeps/unix/sysv/linux/_exit.c:32 32 INLINE_SYSCALL (exit_group, 1, status); (gdb) I'd be great if a test case exercised all variations of follow-fork parent/ child, detach-on-fork on/off. -- You are receiving this mail because: You are on the CC list for the bug.