This is the mail archive of the
mailing list for the GDB project.
Re: gdb/remote - I/O
I guess Mark found a way to preserve the Request-Response nature of the
protocol while processing input without the need of an interrupt.
When the target program issues a read from the console, the stub should
stop it and send a "T" packet with SIGTTIN (read on terminal by
This reflects what really happens. The application will probably issue
a prompt ("O" packets) and then will need input and will have to halt
and wait for it.
However, this now puts GDB in an "inferior input" state, as state that
we did not have before). At what level will this be handled?
There are several details that have to be sorted out as well, like if
the "i" packet does not have all the input needed by the read to
continue what should the target do? Maybe issue another "T<SIGTTIN>"
until it gets all the data it needs. On the other extreme the user may
have typed ahead. We can just have the stub discard those (but if we
have echoed the characters typed on the GDB console this can be
Red Hat Canada Ltd. E-Mail: email@example.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9