GDB remote stdio (clarification)

Graeme Peterson
Thu Jan 10 17:09:00 GMT 2002

Thanks everyone who responded.  It's great to be part
of a responsive group.  I think I should clarify my 
question though.

My stub that talks to our remote debug server works and
it handles the stdout and stderr correctly for us.  What
I don't see how to do properly is share the console with

Does GDB-5.0 have an existing mechanism for determining when
the keyboard input should go to GDB and when it should go
to the inferior?  Is there an existing mechanism for
intercepting the keyboard input from the console and sending
it to the inferior on the remote target?  If so, does it take
into account things like DDD's execution window?

I modified ser-unix.c and got this working for TCP/IP connections
to our debug server by adding the STDIN fd to the fd set before
calling select, when the inferior is allowed to run.  However, 
this code is not called for raw serial connections, which use 
polling and timeouts.  Also, I would rather use existing mechanisms
rather than hack common GDB source to do what I want.  I eventually
want to roll these changes into the GNU head branch.

Anyone?  Or is there another resource I can try to resolve this?

Thanks again.

Graeme Peterson (aka GP)

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list