This is the mail archive of the 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]

Re: gdb/remote - I/O

Andrew Cagney wrote:
> Fernando Nasser wrote:
> >
> > 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
> > background process).
> >
> > 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.
> I don't think trying to overload SIGTTIN is correct.  A remote UNIX
> process could get that for reasons other than needing to get input from
> GDB>

It is not "overloading".  The meaning of SIGTTIN is _exactly_ a request
for read from the terminal from a process that does not have immediate
access to the terminal (being in the background is the native version of
this situation).  It is used to tell whoever (if someone) can help this
program to have the input it needs.  In this case it is GDB as it is
acting as it has the "console" for that program.

Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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