Hello,
I haved configured gdb on a SUN sparc station (host
"sparc-sun-solaris2.5.1"). I have implemented a remote target
(sparc like) that is controlled over a socket connection
(host_name:6500). If the target does not answer for any reason, gdb
hangs.
I have traced the problem back to the file ser-unix.c which is
supposed to handle the timeout for the remote target. The function
"do_unix_read_char"
splits the timeout into slices of 1 second and then performs a
"read". On a socket this "read" appears to block gdb until the remote
target answers. As far as I understood, this is not the expected
behavior. The socket should be non-blocking. This can be easily
achieved by inserting the folowing code at the end of the function
"tcp_open"
in the file "ser-tcp.c"
tmp = 1;
if (ioctl (scb->fd, FIONBIO, &tmp, sizeof (tmp )) < 0)
return -1;
Regards
Roland SCHMITT