This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 16/18] gdbserver/linux: Always wake up event loop after resume


On 10/26/2015 02:32 PM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
> 
>> Handle this in the same way nat/linux-nat.c:linux_nat_resume handles
>> this.
> 
> Nit, it is linux-nat.c instead of nat/linux-nat.c.  In linux_nat_resume,
> async_file_mark is guarded by lwp_status_pending_p (lp), so we need to
> check whether there is an event pending in GDBserver too.

I don't think we can just check whether there is an event pending
in the current thread -- the pending event may be in any
other thread that is now resumed from the client's perspective.
As we'd have to walk all threads anyway, seems simplest to just
unconditionally mark the event loop and let linux_wait & friends
handle that.

On the native side, we may have a latent bug and things work anyhow
because something else always wakes up the event loop once.  (E.g.,
nowadays target_async always marks infrun's event source.)

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]