[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cygwin
Subject:    serial port read failure
From:       "John E. A." <johnea () cox ! net>
Date:       2002-12-30 19:33:51
[Download RAW message or body]


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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic