From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25178 invoked by alias); 17 May 2013 06:57:43 -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 25169 invoked by uid 89); 17 May 2013 06:57:43 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 17 May 2013 06:57:42 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2F0E71C6FF3 for ; Fri, 17 May 2013 02:57:41 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id S1oSDKkYZ++y for ; Fri, 17 May 2013 02:57:41 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id B736A1C6D9D for ; Fri, 17 May 2013 02:57:40 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id ACDACC25F1; Fri, 17 May 2013 10:57:34 +0400 (RET) Date: Fri, 17 May 2013 06:57:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [RFA] gdbserver/lynx178: spurious SIG61 signal when resuming inferior. Message-ID: <20130517065734.GH4017@adacore.com> References: <1368441986-14478-1-git-send-email-brobecker@adacore.com> <5190FA82.7030703@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline In-Reply-To: <5190FA82.7030703@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Found: No X-SW-Source: 2013-05/txt/msg00669.txt.bz2 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 430 > Nit, the comments above talk about null_ptid, while the code is > really checking for minus_one_ptid (wildcard). Argh! Going through the emails, I noticed I forgot about this comment before committing. Sorry about that... Fixed thusly. gdb/gdbserver/ChangeLog: * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid confusion in comment. Tested by rebuilding the lynx178 gdbserver. Checked in. -- Joel --nFreZHaLTZJo0R7j Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-gdbserver-lynx178-Fix-null_ptid-vs-minus_one_ptid-co.patch" Content-length: 2508 >From 415cbe11443c18ee01256eb6d529005a6c6fa7e2 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 17 May 2013 02:49:40 -0400 Subject: [PATCH] [gdbserver/lynx178]: Fix null_ptid -vs- minus_one_ptid confusion in comment gdb/gdbserver/ChangeLog: * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid confusion in comment. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/lynx-low.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 5cc2c25..bc2ba38 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,10 @@ 2013-05-17 Joel Brobecker + * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid + confusion in comment. + +2013-05-17 Joel Brobecker + * lynx-low.c (struct process_info_private): New type. (lynx_add_process): New function. (lynx_create_inferior, lynx_attach): Replace calls to diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index b4cb5d2..3dbffa5 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -284,7 +284,7 @@ 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' + /* If given a minus_one_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 @@ -293,10 +293,10 @@ lynx_resume (struct thread_resume *resume_info, size_t n) 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. */ + /* The ptid might still be minus_one_ptid; 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); -- 1.7.0.4 --nFreZHaLTZJo0R7j--