From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26920 invoked by alias); 8 Aug 2008 21:57:02 -0000 Received: (qmail 26862 invoked by uid 22791); 8 Aug 2008 21:57:01 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 21:56:21 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m78LpPBm026663; Fri, 8 Aug 2008 23:51:25 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m78LpP2T028239; Fri, 8 Aug 2008 23:51:25 +0200 (CEST) Date: Fri, 08 Aug 2008 21:57:00 -0000 Message-Id: <200808082151.m78LpP2T028239@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <200808080236.04076.pedro@codesourcery.com> (message from Pedro Alves on Fri, 8 Aug 2008 02:36:03 +0100) Subject: Re: [3/7] Adjust the bsd-uthread target References: <200808080236.04076.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-08/txt/msg00225.txt.bz2 > From: Pedro Alves > Date: Fri, 8 Aug 2008 02:36:03 +0100 > > This patch adjusts the bsd-uthread target to use thread_change_ptid, > and to never let the core see an event happen in a thread not in > the thread table. > > Tested on i386-unknown-freebsd6.0 with a little hack in the > testsuite to link the gdb.thread tests against -lc_r instead > of -lpthread, and on i386-unknown-openbsd4.3, where no hack is > needed. > > This patch depends on patch 1 and 2. > > OK? > > Index: src/gdb/bsd-uthread.c > =================================================================== > --- src.orig/gdb/bsd-uthread.c 2008-07-29 12:06:38.000000000 +0100 > +++ src/gdb/bsd-uthread.c 2008-07-29 12:17:34.000000000 +0100 > @@ -413,7 +415,7 @@ bsd_uthread_find_new_threads (void) > { > ptid_t ptid = ptid_build (pid, 0, addr); > > - if (!in_thread_list (ptid)) > + if (!in_thread_list (ptid) || is_exited (ptid)) > add_thread (ptid); This doesn't make sense to me. You're adding a threadhere that's no longer there?