From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26124 invoked by alias); 14 Sep 2011 17:59:40 -0000 Received: (qmail 26112 invoked by uid 22791); 14 Sep 2011 17:59:39 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 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, 14 Sep 2011 17:59:25 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R3tk4-0002Gc-Pi from pedro_alves@mentor.com ; Wed, 14 Sep 2011 10:59:24 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 14 Sep 2011 18:59:22 +0100 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Thread exit error : gdb7.2 in FreeBSD (built from ports) Date: Wed, 14 Sep 2011 17:59:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.0; x86_64; ; ) Cc: Jusctsch References: <32463912.post@talk.nabble.com> <201109141604.02961.pedro@codesourcery.com> <32465344.post@talk.nabble.com> In-Reply-To: <32465344.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109141859.20945.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-09/txt/msg00047.txt.bz2 Please don't top post. On Wednesday 14 September 2011 18:12:06, Jusctsch wrote: > > Sure, > I am running on FreeBSD, and they pull vanilla source and apply their > patches to it. In addition, I had written a patch on my own which is > removing an error check in get_current_frame on thread exit and running into > an issue later on. I'm disregarding the fatal errors in the previous post > and focusing on the "invalid thread" issue. With just the FreeBSD patches > applied on gdb7.2, I boot up my application and see the following: > > =thread-created,id="60",group-id="i1" > ~"[New Thread 803855740 (LWP 100223)]\n" > *running,thread-id="all" > =thread-created,id="61",group-id="i1" > ~"[New Thread 82b055500 (LWP 100235)]\n" > *running,thread-id="all" > ~"[Thread 82b055c00 (LWP 100221 FooTask) exited]\n" > =thread-exited,id="58",group-id="i1" > &"/tmp/.gdbinit:4: Error in sourced command file:\n" > &"Invalid selected thread.\n" > (gdb) I understand that the whole program exited, and you're getting that error from withing get_current_frame, right? Please give me the most detail as possible so that I don't have to try to guess things. Why is GDB calling get_current_frame at all? Please show the same but with "set debug infrun 1". Sounds like a FreeBSD backend bug. -- Pedro Alves