From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15893 invoked by alias); 6 Aug 2003 17:11:12 -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 15876 invoked from network); 6 Aug 2003 17:11:09 -0000 Received: from unknown (HELO touchme.toronto.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 6 Aug 2003 17:11:09 -0000 Received: from redhat.com (toocool.toronto.redhat.com [172.16.14.72]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 1F8F180004A; Wed, 6 Aug 2003 13:11:09 -0400 (EDT) Message-ID: <3F3136AD.4010300@redhat.com> Date: Wed, 06 Aug 2003 17:11:00 -0000 From: "J. Johnston" Organization: Red Hat Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "J. Johnston" Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: patch to lin-lwp.c References: <3F303C1E.7040304@redhat.com> Content-Type: multipart/mixed; boundary="------------010001080002070407040301" X-SW-Source: 2003-08/txt/msg00080.txt.bz2 This is a multi-part message in MIME format. --------------010001080002070407040301 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 774 Sorry, forgot to attach patch. J. Johnston wrote: > The attached patch is created to deal with the problem as discussed on: > > http://sources.redhat.com/ml/gdb/2003-08/msg00043.html > > The fix does two things: > > 1. it sets the resumed flag for threads we stopped when the main thread > exited and then resumed > 2. changes the running_callback to include threads that have events > pending on them that will be caught on the next wait > > Ok to commit? > > -- Jeff J. > > 2003-08-05 Jeff Johnston > > * lin-lwp-wait.c (stop_and_resume_callback): Set the resumed flag > for any lwp we resume. > (running_callback): Add lwps that have pending status events > against them to be considered running. > > > --------------010001080002070407040301 Content-Type: text/plain; name="lin-lwp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="lin-lwp.patch" Content-length: 769 Index: lin-lwp.c =================================================================== RCS file: /cvs/src/src/gdb/lin-lwp.c,v retrieving revision 1.47 diff -u -r1.47 lin-lwp.c --- lin-lwp.c 19 Jun 2003 22:52:03 -0000 1.47 +++ lin-lwp.c 5 Aug 2003 23:09:55 -0000 @@ -839,7 +839,7 @@ static int running_callback (struct lwp_info *lp, void *data) { - return (lp->stopped == 0); + return (lp->stopped == 0 || (lp->status != 0 && lp->resumed)); } /* Count the LWP's that have had events. */ @@ -1087,7 +1087,10 @@ /* Resume if the lwp still exists. */ for (ptr = lwp_list; ptr; ptr = ptr->next) if (lp == ptr) - resume_callback (lp, NULL); + { + resume_callback (lp, NULL); + resume_set_callback (lp, NULL); + } } return 0; } --------------010001080002070407040301--