From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21205 invoked by alias); 26 Aug 2003 17:52:32 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 21193 invoked from network); 26 Aug 2003 17:52:31 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 26 Aug 2003 17:52:31 -0000 Received: from drow by nevyn.them.org with local (Exim 4.20 #1 (Debian)) id 19rhyh-0006bD-EH; Tue, 26 Aug 2003 13:51:35 -0400 Date: Tue, 26 Aug 2003 17:52:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com, jjohnstn@redhat.com Subject: lin-lwp and exiting threads Message-ID: <20030826175135.GA25329@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, jjohnstn@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2003-08/txt/msg00448.txt.bz2 Hi Jeff, I'm doing some work in lin-lwp.c and I saw this bit you recently committed: + /* Check if the current LWP has previously exited. For nptl threads, + there is no exit signal issued for LWPs that are not the + main thread so we should check whenever the thread is stopped. */ + if (!lin_lwp_thread_alive (lp->ptid)) + { + if (in_thread_list (lp->ptid)) + { + /* Core GDB cannot deal with us deleting the current + thread. */ + if (!ptid_equal (lp->ptid, inferior_ptid)) + delete_thread (lp->ptid); + printf_unfiltered ("[%s exited]\n", + target_pid_to_str (lp->ptid)); + } + if (debug_lin_lwp) + fprintf_unfiltered (gdb_stdlog, + "SWC: %s already exited.\n", target_pid_to_str (lp->ptid)); This is right after waitpid has returned a non-exiting stopped status for lp->ptid. Were you just being thorough, or do you have some reason to believe that waitpid would ever return WIFSTOPPED (status) and yet the thread would be dead? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer