From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10813 invoked by alias); 8 Aug 2008 20:16:13 -0000 Received: (qmail 10797 invoked by uid 22791); 8 Aug 2008 20:16:12 -0000 X-Spam-Check-By: sourceware.org Received: from hiauly1.hia.nrc.ca (HELO hiauly1.hia.nrc.ca) (132.246.100.193) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 20:14:59 +0000 Received: by hiauly1.hia.nrc.ca (Postfix, from userid 1000) id 3064B4EBE; Fri, 8 Aug 2008 16:14:57 -0400 (EDT) Subject: Re: ttrace: Protocal error To: dave@hiauly1.hia.nrc.ca (John David Anglin) Date: Fri, 08 Aug 2008 20:16:00 -0000 From: "John David Anglin" Cc: pedro@codesourcery.com, gdb-patches@sourceware.org In-Reply-To: <20080808192932.0E0354EBE@hiauly1.hia.nrc.ca> from "John David Anglin" at Aug 8, 2008 03:29:31 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20080808201457.3064B4EBE@hiauly1.hia.nrc.ca> 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: 2008-08/txt/msg00221.txt.bz2 > Hmmm, the thread seems to have exited but state_ is still 1. The patch below seems to fix the problem. I was finally able to catch an abort in vla6.f90. Ok? (gdb) r Starting program: /mnt/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libgomp/testsuite/vla6.x3g warning: Private mapping of shared library text was not specified by the executable; setting a breakpoint in a shared library which is not privately mapped will not work. See the HP-UX 11i v3 chatr manpage for methods to privately map shared library text. [New process 6450, lwp 7134092] [process 6450, lwp 7134092 exited] [New process 6450, lwp 7134093] [process 6450, lwp 7134093 exited] [New process 6450, lwp 7134094] [process 6450, lwp 7134094 exited] [New process 6450, lwp 7134095] [process 6450, lwp 7134095 exited] [New process 6450, lwp 7134096] [New process 6450, lwp 7134097] [New process 6450, lwp 7134098] [New process 6450, lwp 7134099] [New process 6450, lwp 7134100] Program received signal SIGABRT, Aborted. 0xc020da50 in kill () from /usr/lib/libc.2 (gdb) bt #0 0xc020da50 in kill () from /usr/lib/libc.2 #1 0xc01a7f74 in raise () from /usr/lib/libc.2 #2 0xc01e92c8 in abort_C () from /usr/lib/libc.2 #3 0xc01e9324 in abort () from /usr/lib/libc.2 #4 0xc1c7ea20 in _gfortran_abort () at ../../../gcc/libgfortran/intrinsics/abort.c:39 #5 0x00007d04 in foo.572 (c=, d=, e=, f=, g=, h=, i=, j=, k=, n=, _c=, _d=, _g=, _h=) at /mnt/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/vla6.f90:175 #6 0x00007e58 in test.560 () at /mnt/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/vla6.f90:189 #7 0x00007ea8 in MAIN__ () at /mnt/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/vla6.f90:3 #8 0x00007f30 in main (argc=1, argv=0x7eff050c) at ../../../gcc/libgfortran/fmain.c:21 (gdb) info shared >From To Syms Read Shared Object Library 0xc0010000 0xc0044084 Yes /usr/lib/dld.sl 0xc0e1c000 0xc0e28000 Yes /mnt/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs/libgomp.sl.1 0xc1bc0000 0xc1c9c000 Yes /mnt/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs/libgfortran.sl.3 0xc0e00000 0xc0e19000 Yes /mnt/gnu/gcc/objdir/./gcc/libgcc_s.sl 0xc00c0000 0xc00ec000 Yes /usr/lib/libm.2 0xc03bc000 0xc03c0000 Yes /usr/lib/librt.2 0xc0050000 0xc0069000 Yes /opt/langtools/lib/libpthread.1 0xc0100000 0xc024b000 Yes /usr/lib/libc.2 0xc0005000 0xc0008000 Yes /usr/lib/libdld.2 0xc0004000 0xc0005000 Yes /opt/graphics/OpenGL/lib/libogltls.sl This is with Pedro's change. Dave -- J. David Anglin dave.anglin@nrc-cnrc.gc.ca National Research Council of Canada (613) 990-0752 (FAX: 952-6602) 2008-08-08 John David Anglin * inf-ttrace.c (inf_ttrace_resume_callback): Don't resume dying thread. Index: inf-ttrace.c =================================================================== RCS file: /cvs/src/src/gdb/inf-ttrace.c,v retrieving revision 1.30 diff -u -3 -p -r1.30 inf-ttrace.c --- inf-ttrace.c 9 Jul 2008 22:23:05 -0000 1.30 +++ inf-ttrace.c 8 Aug 2008 19:57:13 -0000 @@ -787,7 +804,9 @@ inf_ttrace_kill (void) static int inf_ttrace_resume_callback (struct thread_info *info, void *arg) { - if (!ptid_equal (info->ptid, inferior_ptid)) + if (!ptid_equal (info->ptid, inferior_ptid) + && !((struct inf_ttrace_private_thread_info *)info->private)->dying + && !is_exited (info->ptid)) { pid_t pid = ptid_get_pid (info->ptid); lwpid_t lwpid = ptid_get_lwp (info->ptid);