From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26006 invoked by alias); 27 May 2008 23:23:50 -0000 Received: (qmail 25998 invoked by uid 22791); 27 May 2008 23:23:50 -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:23:32 +0000 Received: from spaceape7.eur.corp.google.com (spaceape7.eur.corp.google.com [172.28.16.141]) by smtp-out.google.com with ESMTP id m4RNNQg1026373 for ; Wed, 28 May 2008 00:23:26 +0100 Received: from yw-out-1718.google.com (ywr5.prod.google.com [10.192.18.5]) by spaceape7.eur.corp.google.com with ESMTP id m4RNNPDP023622 for ; Wed, 28 May 2008 00:23:26 +0100 Received: by yw-out-1718.google.com with SMTP id 5so1360292ywr.54 for ; Tue, 27 May 2008 16:23:25 -0700 (PDT) Received: by 10.150.79.32 with SMTP id c32mr2357216ybb.139.1211930605686; Tue, 27 May 2008 16:23:25 -0700 (PDT) Received: by 10.151.99.13 with HTTP; Tue, 27 May 2008 16:23:25 -0700 (PDT) Message-ID: <8ac60eac0805271623g492ade49j4da414d3c757d846@mail.gmail.com> Date: Wed, 28 May 2008 17:10: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/msg00725.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