From mboxrd@z Thu Jan 1 00:00:00 1970 From: "William A. Gatliff" To: cygwin@cygwin.com, gdb@sources.redhat.com Subject: Re: [1.3.3] breaks serial i/o? Date: Fri, 19 Oct 2001 14:55:00 -0000 Message-id: <20011019165550.A1767@saturn.billgatliff.com> References: <20011018161003.A3059@saturn.billgatliff.com> <20011018222406.C11830@redhat.com> <20011019085618.A5013@saturn.billgatliff.com> <20011019114712.A23101@visi.com> <20011019130301.A26885@redhat.com> <20011019133042.J1140@saturn.billgatliff.com> <20011019141204.L1140@saturn.billgatliff.com> X-SW-Source: 2001-10/msg00202.html Guys (and gals too!): > Here's some of the (apparently) relevant code in gdb's RDI support: NOnonono, that was all wrong. For starters, under Cygwin it doesn't compile with COMPILING_FOR_WINDOWS at all. I whipped out the oscilloscope, and confirmed that, in fact, I do get serialio on com1 under Cygwin 1.3.3 whether CTS/RTS are tied together or not. This is news to me, as the problem seemed to follow CTS/RTS... I'm now running arm-elf-gdb under gdb under cygwin-1.3.3. And from what I've seen so far, there are just general instabilities everywhere in the serial i/o related stuff. It seems to frequently hang at line 307 of unixcomm.c, in the Unix_ReadSerial() function. It's as if it goes into read(), and never returns. Serpfd==3, err==1 in most cases. It doesn't always hang there, but it has hung there several times. Here's the code: gdb/rdi-share/unixcomm.c extern int Unix_ReadSerial(unsigned char *buf, int n, bool block) { fd_set fdset; struct timeval tv; int err; FD_ZERO(&fdset); FD_SET(serpfd, &fdset); tv.tv_sec = 0; tv.tv_usec = (block ? 10000 : 0); err = select(serpfd + 1, &fdset, NULL, NULL, &tv); if (err < 0 && errno != EINTR) { #ifdef DEBUG perror("select"); #endif panic("select failure"); return -1; } else if (err > 0 && FD_ISSET(serpfd, &fdset)) { int s; s = read(serpfd, buf, n); if (s < 0) perror("read:"); return s; ... I'll try it under 1.3.2 and see if I can get any insights (pardon the pun). Ideas? b.g. -- Bill Gatliff bgat@billgatliff.com