delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/19/17:57:19

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 19 Oct 2001 16:55:50 -0500
From: "William A. Gatliff" <bgat AT saturn DOT billgatliff DOT com>
To: cygwin AT cygwin DOT com, gdb AT sources DOT redhat DOT com
Subject: Re: [1.3.3] breaks serial i/o?
Message-ID: <20011019165550.A1767@saturn.billgatliff.com>
Reply-To: bgat AT billgatliff DOT com
References: <20011018161003 DOT A3059 AT saturn DOT billgatliff DOT com> <20011018222406 DOT C11830 AT redhat DOT com> <20011019085618 DOT A5013 AT saturn DOT billgatliff DOT com> <20011019114712 DOT A23101 AT visi DOT com> <20011019130301 DOT A26885 AT redhat DOT com> <20011019133042 DOT J1140 AT saturn DOT billgatliff DOT com> <20011019141204 DOT L1140 AT saturn DOT billgatliff DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <20011019141204.L1140@saturn.billgatliff.com>; from bgat@saturn.billgatliff.com on Fri, Oct 19, 2001 at 02:12:04PM -0500

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 AT billgatliff DOT com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019