From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26726 invoked by alias); 27 May 2008 23:25:39 -0000 Received: (qmail 26710 invoked by uid 22791); 27 May 2008 23:25:37 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 May 2008 23:25:16 +0000 Received: from spaceape10.eur.corp.google.com (spaceape10.eur.corp.google.com [172.28.16.144]) by smtp-out.google.com with ESMTP id m4RNP80V010423 for ; Wed, 28 May 2008 00:25:08 +0100 Received: from wx-out-0506.google.com (wxdi28.prod.google.com [10.70.135.28]) by spaceape10.eur.corp.google.com with ESMTP id m4RNP5jN018938 for ; Wed, 28 May 2008 00:25:07 +0100 Received: by wx-out-0506.google.com with SMTP id i28so2559393wxd.10 for ; Tue, 27 May 2008 16:25:07 -0700 (PDT) Received: by 10.70.10.3 with SMTP id 3mr2305714wxj.62.1211930706843; Tue, 27 May 2008 16:25:06 -0700 (PDT) Received: by 10.70.19.19 with HTTP; Tue, 27 May 2008 16:25:06 -0700 (PDT) Message-ID: <8ac60eac0805271625j5a864522x6afb85f234e7c2c8@mail.gmail.com> Date: Wed, 28 May 2008 17:49:00 -0000 From: "Paul Pluzhnikov" To: "Pedro Alves" Subject: Re: [RFC] Fix for gdb crash in "info thread" after exec(). Cc: gdb-patches@sourceware.org In-Reply-To: <200805272106.16082.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080527190702.6956D3A6952@localhost> <200805272106.16082.pedro@codesourcery.com> 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-05/txt/msg00726.txt.bz2 On Tue, May 27, 2008 at 1:06 PM, Pedro Alves wrote: > Could you confirm that this hunk of my patch, > > Index: src/gdb/linux-thread-db.c > =================================================================== > --- src.orig/gdb/linux-thread-db.c 2008-05-06 12:22:31.000000000 +0100 > +++ src/gdb/linux-thread-db.c 2008-05-06 12:53:18.000000000 +0100 > @@ -840,7 +840,7 @@ thread_db_wait (ptid_t ptid, struct targ > unpush_target (&thread_db_ops); > using_thread_db = 0; > > - return pid_to_ptid (GET_PID (ptid)); > + return ptid; > } > > /* If we do not know about the main thread yet, this would be a good time > to > > ... fixes the issue, Confirmed. > and that you were hitting that new_thread_event piece > in infrun.c:handle_inferior_event while handling a TARGET_WAITKIND_EXECD ? I am not sure I understand that second question correctly. The 'ecs->new_thread_event' is set to 0 while handling TARGET_WAITKIND_EXECD, and add_thread() is not called for it. > We may need some more interface cleanup to clear the current thread > list across an exec, if the original process had threads, but I don't > think your call is in the right place. Yes, it did feel out of place to me as well. Thanks, -- Paul Pluzhnikov