Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] gdbserver/lynx178: spurious SIG61 signal when resuming inferior.
Date: Mon, 13 May 2013 14:36:00 -0000	[thread overview]
Message-ID: <5190FA82.7030703@redhat.com> (raw)
In-Reply-To: <1368441986-14478-1-git-send-email-brobecker@adacore.com>



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


  parent reply	other threads:[~2013-05-13 14:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 10:46 Joel Brobecker
2013-05-13 11:22 ` Pedro Alves
2013-05-13 11:25   ` Pedro Alves
2013-05-13 13:28   ` Joel Brobecker
2013-05-13 14:28     ` Pedro Alves
2013-05-16 12:24       ` Joel Brobecker
2013-05-16 13:14         ` Pedro Alves
2013-05-13 14:36 ` Pedro Alves [this message]
2013-05-17  6:57   ` Joel Brobecker
2013-05-17  6:48 ` Checked in: " Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5190FA82.7030703@redhat.com \
    --to=palves@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox