gdbserver using serial port

Yoriko Komatsuzaki
2007-11-02T02:14:20Z

Hello,

I would like to ask you about gdbserver in case of using serial port.
In gdb-6.6, if I run gdbserver using serial port, the following messages
continue and it can't establish the connection to host gdb.

% gdbserver /dev/ttyS0 a.out
...
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
Remote side has terminated connection. GDBserver will reopen the connection.
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
Remote side has terminated connection. GDBserver will reopen the connection.
Remote debugging using /dev/ttyS0
readchar: Socket operation on non-socket
...

And then in gdb-6.7, the following messages are displayed.

% gdbserver /dev/ttyS0 a.out
Process a.out created; pid = 10696
Remote debugging using /dev/ttyS0

So I ran the host gdb and tried to establish the connection between host
and target, but couldn't establish the connections channel.

In the both cases, if I use the network as the debug channel,
I can use the gdb/gdbserver without any problems.

Do you have any ideas or comments ?

Thank you.