From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1067 invoked by alias); 4 Jan 2013 20:59:25 -0000 Received: (qmail 1046 invoked by uid 22791); 4 Jan 2013 20:59:23 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Jan 2013 20:59:17 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r04KxFU6007951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Jan 2013 15:59:15 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r04KxDMv001450; Fri, 4 Jan 2013 15:59:14 -0500 Message-ID: <50E742A1.6040804@redhat.com> Date: Fri, 04 Jan 2013 20:59:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [commit] LynxOS: Resume the same thread when receiving a thread create/exit event. References: <1355743597-15380-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1355743597-15380-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2013-01/txt/msg00076.txt.bz2 On 12/17/2012 11:26 AM, Joel Brobecker wrote: > Before this patch, the ptid passed to lynx_resume was completely > ignored, and we used the current_inferior. This resulted in trying > to resume the inferior execution using the wrong ptid after having > received a thread create/exit event, because the inferior_ptid > was still set to the ptid prior to receiving the signal. > > gdb/gdbserver/ChangeLog: > > * lynx-low.c (lynx_resume): Use the resume_info parameter > to determine the ptid for the lynx_ptrace call, unless > it is equal to minus_one_ptid, in which case we use the > ptid of the current_inferior. > (lynx_wait_1): After having received a thread create/exit > event, resume the inferior's execution using the signaling > thread's ptid, rather than the old ptid. > > Tested on ppc-lynx5. > > I hesitated a little before self-approving. But it seemed sufficiently > straightforward and enough of an improvement (in lynx_resume) that > I allowed myself to go ahead. I will handle comments right away, > if any. Looks fine to me. -- Pedro Alves