From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25078 invoked by alias); 4 Nov 2011 22:17:51 -0000 Received: (qmail 25069 invoked by uid 22791); 4 Nov 2011 22:17:50 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,T_FRT_BELOW2 X-Spam-Check-By: sourceware.org Received: from e24smtp03.br.ibm.com (HELO e24smtp03.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 22:17:35 +0000 Received: from /spool/local by e24smtp03.br.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Nov 2011 20:17:32 -0200 Received: from d24relay01.br.ibm.com ([9.8.31.16]) by e24smtp03.br.ibm.com ([10.172.0.139]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 4 Nov 2011 20:17:31 -0200 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.8.31.91]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pA4MFajI3022962 for ; Fri, 4 Nov 2011 19:15:36 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pA4MHMDM021791 for ; Fri, 4 Nov 2011 20:17:22 -0200 Received: from [9.18.197.17] ([9.18.197.17]) by d24av01.br.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pA4MHMsP021788; Fri, 4 Nov 2011 20:17:22 -0200 Message-ID: <4EB46474.2040206@linux.vnet.ibm.com> Date: Fri, 04 Nov 2011 22:17:00 -0000 From: Edjunior Barbosa Machado User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 MIME-Version: 1.0 To: gdb-patches@sourceware.org, jan.kratochvil@redhat.com Subject: internal error when setting watchpoints in programs with fork() on ppc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit x-cbid: 11110422-9254-0000-0000-0000071E0A9A X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-11/txt/msg00125.txt.bz2 Hi, testing upstream gdb, I'm facing this internal error when running gdb.threads/watchpoint-fork.exp testcase (from this non-upstreamed patch http://sourceware.org/ml/gdb-patches/2010-12/msg00043.html, found in gdb from Fedora and enterprise distros) on ppc64, more specifically in the `set follow-fork-mode child' part of the test: ../../gdb.git/gdb/frame.c:2375: internal-error: frame_cleanup_after_sniffer: Assertion `frame->prologue_cache == NULL' failed. Actually, noticed that before this error, gdb fails to read r31 due to a wrong pid when issuing ptrace call on fetch_register() from ppc-linux-nat.c. This gdb-follow-child-stale-parent.patch from Jan Kratochvil (http://web.archiveorange.com/archive/v/iRKxrvg3CBOJl9wyV0pi, attached bellow) fixes this issue. Does this look ok for FSF gdb as well? Thanks! -- Edjunior ps: since this is a patch made by Jan, I didn't add the changelog entry yet diff --git a/gdb/infrun.c b/gdb/infrun.c index 7ec0788..d8f89f5 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -506,6 +506,9 @@ follow_fork (void) } else { + /* Possibly referenced PARENT is no longer valid. */ + reinit_frame_cache (); + /* This pending follow fork event is now handled, one way or another. The previous selected thread may be gone from the lists by now, but if it is still around, need