This is the mail archive of the
mailing list for the Cygwin project.
serial port read failure
- From: "John E. A." <johnea at cox dot net>
- To: cygwin at cygwin dot com
- Cc: johnea at cox dot net
- Date: Mon, 30 Dec 2002 11:33:51 -0800
- Subject: serial port read failure
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
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:
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 ()
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