delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/30/14:35:57

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3E109F9F.9070008@cox.net>
Date: Mon, 30 Dec 2002 11:33:51 -0800
From: "John E. A." <johnea AT cox DOT net>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
CC: johnea AT cox DOT net
Subject: serial port read failure

Hi There,

I've been compiling a simple application in both linux and cygwin. I hacked it 
from a GNU readline library application example: fileman.c

I added serial port device access (/dev/ttyS0) to this program via both stream 
i/o (fopen, putc, etc) and low level i/o (open, read, etc) both versions work 
when compiled under linux, neither work when compiled under cygwin.

I've stepped through my code using gdb --nw and find that the failures usually 
occur in the fgetc and read functions.

Sometimes I can single-step through these functions with success, but they never 
run successfully, at full speed, in cygwin.

I have a new full net install of cygwin: 1.3.17 including source, running on 
win2k pro.

Can someone please provide some simple working example of serial port device access?

Additionally I am not able to step into the newlib source. Any tips on getting 
gdb to step into the library function source would also be greatly appreciated. 
For example, If I'm on a source line of:
143	data = fgetc(port);
and enter a gdb command of:
(gdb) s
my last printf data is flushed from the output buffer (it didn't end in \n) and 
then it just hangs. When I C-c I get:
Program received signal SIGINT, Interrupt.
[Switching to thread 900.0x3f4]
0x77ec7fb0 in _libkernel32_a_iname ()
(gdb) Quit
(gdb) _
and I'm back at the gdb prompt.

Thank You for your reply...

John E. A.


--
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