From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5315 invoked by alias); 26 Oct 2011 14:49:12 -0000 Received: (qmail 5305 invoked by uid 22791); 26 Oct 2011 14:49:11 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_XA X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 14:48:58 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RJ4mm-0001tZ-PV from pedro_alves@mentor.com ; Wed, 26 Oct 2011 07:48:57 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 26 Oct 2011 15:48:54 +0100 From: Pedro Alves To: gdb@sourceware.org Subject: Re: GDB problems with pthread_join() Date: Wed, 26 Oct 2011 15:56:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: Jeff Kenton References: <4EA5C49B.5000302@tilera.com> In-Reply-To: <4EA5C49B.5000302@tilera.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110261548.49941.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00183.txt.bz2 On Monday 24 October 2011 21:03:39, Jeff Kenton wrote: > > I have gdb-7.1 mostly working on our two processors (one is 32-bit, the > other 64-bit). With a trivial pthread program running under GDB with no > breakpoints set, it runs to completion on one machine (32-bit) but hangs > on the other with: > > Program received signal SIGTRAP, Trace/breakpoint trap. > [Switching to Thread 0xaaab54f200 (LWP 721)] > 0x000000aaaab09e58 in pthread_join (threadid=733018911232, > thread_return=0x0) > at pthread_join.c:89 > > The SIGTRAP could be GDB's hook into the pthread library but I'm not > sure. Other SIGTRAPs succeed happily (traced with set debug infrun 1). "maint info breakpoints" shows the addresses of thread event breakpoints, if your port uses those. > Any clues? Anyone seen this before? Thoughts besides "sounds nasty and > you'll have to figure it out yourself"? There's not much information in your email to go by, but similar weird things can happen if you use a 32-bit gdb to debug a 64-bit program on other archs. If that's the case, try building a 64-bit gdb for the 64-bit machine. If not, assuming you're native linux, maybe "set debug lin-lwp 1" casts some more light. Good luck. -- Pedro Alves