From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4602 invoked by alias); 13 May 2013 14:36:55 -0000 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 Received: (qmail 4593 invoked by uid 89); 13 May 2013 14:36:55 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 13 May 2013 14:36:54 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4DEaqxa002670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 13 May 2013 10:36:52 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r4DEapu8015840; Mon, 13 May 2013 10:36:51 -0400 Message-ID: <5190FA82.7030703@redhat.com> Date: Mon, 13 May 2013 14:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: [RFA] gdbserver/lynx178: spurious SIG61 signal when resuming inferior. References: <1368441986-14478-1-git-send-email-brobecker@adacore.com> In-Reply-To: <1368441986-14478-1-git-send-email-brobecker@adacore.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00437.txt.bz2 On 05/13/2013 11:46 AM, Joel Brobecker wrote: > (lynx_resume): If PTID is null, then try using > current_process()->private->last_wait_event_ptid. > @@ -260,6 +284,19 @@ lynx_resume (struct thread_resume *resume_info, size_t n) > ? PTRACE_SINGLESTEP : PTRACE_CONT); > const int signal = resume_info[0].sig; > > + /* If given a null_ptid, then try using the current_process' > + private->last_wait_event_ptid. On most LynxOS versions, > + using any of the process' thread works well enough, but > + LynxOS 178 is a little more sensitive, and triggers some > + unexpected signals (Eg SIG61) when we resume the inferior > + using a different thread. */ > + if (ptid_equal (ptid, minus_one_ptid)) > + ptid = current_process()->private->last_wait_event_ptid; > + > + /* The ptid might still be NULL; this can happen between the moment > + we create the inferior or attach to a process, and the moment > + we resume its execution for the first time. It is fine to > + use the current_inferior's ptid in those cases. */ > if (ptid_equal (ptid, minus_one_ptid)) > ptid = thread_to_gdb_id (current_inferior); > > @@ -285,16 +322,6 @@ lynx_continue (ptid_t ptid) > lynx_resume (&resume_info, 1); > } Nit, the comments above talk about null_ptid, while the code is really checking for minus_one_ptid (wildcard). Otherwise, if this is really what's necessary for Lynx178, then this is OK. -- Pedro Alves