This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: GDB support for stdin on remote targets


GP:



> I am implementing a remote stub,

Have you seen my gdbstubs code on
http://sourceforge.net/projects/gdbstubs?  I don't have anything there
for QNX targets, but if the code can be of any help, feel free to use
it.

> and one of the things I am having trouble with is the remote stdin.

I've often thought that gdb needs an 'o' packet to go with the 'O'
packet.  Gdb's "maintenance" command can be used to fabricate such a
message.

I'm thinking that your target's getch() could just TRAP out to the
stub, and you could then send an 'o' packet to populate your
"keyboard" buffer before resuming.

Just my $0.02.


b.g.


> 
> There does not appear to be a generic GDB mechanism for
> doing this, (or I just haven't found it), and the best I 
> have come up with (so far) is to add the STDIN fd to the 
> select() in ser-unix.c.  This only works for those connections 
> (like TCPIP) that go through that code path.
> 
> Any suggestions?  Basically I want to be able to respond to
> a getch() in the inferior.
> 
> Cheers.
> GP
> 
> 
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
> 

-- 
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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