From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28907 invoked by alias); 18 Sep 2007 10:20:38 -0000 Received: (qmail 28898 invoked by uid 22791); 18 Sep 2007 10:20:37 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 18 Sep 2007 10:20:31 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.0) with ESMTP id l8IAKKVM010542; Tue, 18 Sep 2007 12:20:20 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id l8IAKKtL021625; Tue, 18 Sep 2007 12:20:20 +0200 (CEST) Date: Tue, 18 Sep 2007 10:20:00 -0000 Message-Id: <200709181020.l8IAKKtL021625@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: guitton@adacore.com CC: gdb-patches@sourceware.org In-reply-to: <20070918094806.GA1859@adacore.com> (message from Jerome Guitton on Tue, 18 Sep 2007 11:48:06 +0200) Subject: Re: [RFA/hpux] acknowledging TTEVT_LWP_EXIT References: <20070918094806.GA1859@adacore.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: 2007-09/txt/msg00239.txt.bz2 > Date: Tue, 18 Sep 2007 11:48:06 +0200 > From: Jerome Guitton > > In inf-ttrace, when a TTEVT_LWP_EXIT event is received (thread > exiting), the corresponding thread is removed from the thread list > and never resumed. Which is wrong ; the ttrace man page reads: > > TTEVT_LWP_EXIT This event flag indicates that the debugger wants to > be notified when a thread is exiting via the > lwp_exit() system call. The thread stops upon entry > to the system call. > > So the dying thread is stopped, it should be resumed one last time. > Otherwise, any other thread waiting for its death on pthread_join > would be blocked forever (e.g. in attachment, a simple program which > freezes when it is run under GDB). > > Also in attachement, a patch that fixes this issue. It also fixes 3 > unexpected failures of the testsuite on HPUX 11.11. > > 2007-09-18 Jerome Guitton > > * inf-ttrace.c (inf_ttrace_private_thread_info): New structure type. > (inf_ttrace_delete_dying_threads_callback): New function. > (inf_ttrace_resume): After resuming the execution, iterate over > the dying threads to delete them for the thread list. > (inf_ttrace_wait): on TTEVT_LWP_EXIT and TTEVT_LWP_TERMINATE, > mark the corresponding thread as dying instead of removing it > from the thread list. > (inf_ttrace_thread_alive): return 0 for dying threads. Looks ok to me.