Re: [PATCH] Fix fail in gdb.base/interrupt-noterm.exp

Yao Qi
2016-01-22T17:14:16Z

Pedro Alves <palves@redhat.com> writes:

> Can you expand the rationale some more?
>
> E.g., why is this not a gdbserver bug? Instintively I'd say it is.

The interaction between GDB and GDBserver is like this,

1. GDB sends vCont;c and doesn't wait for the stop reply because
"continue &" is background command,
2. GDBserver receives vCont;c, enables the async i/o (by
enable_async_io) and resumes the inferior.
3. GDB sends interrupt packet,

#1 happens before #2 and #3, but the order of #2 and #3 is not
determined. If #2 happens before #3, it is fine, otherwise, the
GDBserver doesn't know the interrupt from GDB.

--
Yao (齐尧)