From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17321 invoked by alias); 21 Aug 2014 11:33:06 -0000 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 Received: (qmail 17286 invoked by uid 89); 21 Aug 2014 11:33:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Aug 2014 11:33:02 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7LBX1Y3013462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 21 Aug 2014 07:33:01 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7LBWvsn000797; Thu, 21 Aug 2014 07:33:00 -0400 Message-ID: <53F5D8E9.5050900@redhat.com> Date: Thu, 21 Aug 2014 11:33:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Jan Kratochvil CC: gdb-patches@sourceware.org Subject: Re: [patch+7.8?] Fix 'gcore' with exited threads References: <20140609203020.GA22447@host2.jankratochvil.net> <53A8427D.6070902@redhat.com> <20140817211647.GA17152@host2.jankratochvil.net> In-Reply-To: <20140817211647.GA17152@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-08/txt/msg00474.txt.bz2 On 08/17/2014 10:16 PM, Jan Kratochvil wrote: > On Mon, 23 Jun 2014 17:06:37 +0200, Pedro Alves wrote: >> > On 06/09/2014 09:30 PM, Jan Kratochvil wrote: > >>> > > Without the TRY_CATCH protection testsuite FAILs for: >>> > > FAIL: gdb.threads/gcore-thread.exp: save a zeroed-threads corefile >>> > > FAIL: gdb.threads/gcore-thread.exp: core0file: re-load generated corefile (bad file format) >> > >> > What does the log show ? > gcore .../gdb/testsuite/gdb.threads/gcore-thread0.test^M > Cannot find new threads: debugger service failed^M > (gdb) FAIL: gdb.threads/gcore-thread.exp: save a zeroed-threads corefile > + > core .../gdb/testsuite/gdb.threads/gcore-thread0.test^M > ".../gdb/testsuite/gdb.threads/gcore-thread0.test" is not a core dump: File format not recognized^M > (gdb) FAIL: gdb.threads/gcore-thread.exp: core0file: re-load generated corefile (bad file format) Thanks. It'd be good to have this in the commit log. > gdb/ > 2014-08-17 Jan Kratochvil > > * linux-tdep.c (linux_corefile_thread_callback): Ignore THREAD_EXITED. > (linux_make_corefile_notes): call update_thread_list, protected against > exceptions. > > gdb/testsuite/ > 2014-08-17 Jan Kratochvil > > * gdb.threads/gcore-stale-thread.c: New file. > * gdb.threads/gcore-stale-thread.exp: New file. > > diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c > index d0f1106..875f32e 100644 > --- a/gdb/linux-tdep.c > +++ b/gdb/linux-tdep.c > @@ -1194,6 +1194,11 @@ linux_corefile_thread_callback (struct thread_info *info, void *data) > { > struct linux_corefile_thread_data *args = data; > > + /* It can be current thread in non-stop mode > + which cannot be removed by update_thread_list. */ Please remove the "in non-stop mode" bit. The predicate GDB currently chooses to decide whether to switch to another thread or not is "non-stop", but that's bogus and will change (it should be foreground vs background command), and then this comment will most likely end up stale. > +# This file was written by Michael Snyder (msnyder@redhat.com) > +# This is a test for the gdb command "generate-core-file". This paragraph is stale. Otherwise OK. Thanks! IMO, this is good for 7.8. Pedro Alves