This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit] LynxOS: Resume the same thread when receiving a thread create/exit event.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 04 Jan 2013 20:59:13 +0000
- 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>
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