Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "William A. Gatliff" <bgat@saturn.billgatliff.com>
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	[thread overview]
Message-ID: <20011019165550.A1767@saturn.billgatliff.com> (raw)
In-Reply-To: <20011019141204.L1140@saturn.billgatliff.com>

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


  reply	other threads:[~2001-10-19 14:55 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18 14:28 William A. Gatliff
2001-10-18 20:54 ` Christopher Faylor
2001-10-19  6:56   ` William A. Gatliff
2001-10-19  9:14     ` Christopher Faylor
2001-10-19  9:45     ` Grant Edwards
2001-10-19 10:02       ` Christopher Faylor
2001-10-19 11:30         ` William A. Gatliff
2001-10-19 12:12           ` William A. Gatliff
2001-10-19 14:55             ` William A. Gatliff [this message]
2001-10-19 15:07               ` Christopher Faylor
2001-10-20  3:06       ` Robert Collins
2001-10-20 13:08         ` William A. Gatliff
2001-10-20 18:09           ` Robert Collins
2001-10-20 17:41         ` Andrew Cagney
2001-10-19  8:26 ` Grant Edwards
2001-10-19  9:36   ` Fernando Nasser
2001-10-21  9:48 ` Fernando Nasser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011019165550.A1767@saturn.billgatliff.com \
    --to=bgat@saturn.billgatliff.com \
    --cc=cygwin@cygwin.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox