public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Alex Martin <alex@rettc.com>
To: cygwin@cygwin.com
Subject: Re: printf goes to serial port?
Date: Fri, 19 Dec 2008 21:01:00 -0000	[thread overview]
Message-ID: <494C0B68.1040207@rettc.com> (raw)
In-Reply-To: <AE8B53D1324D471B8AAE848A5A215E45@DFW5RB41>



Gary R. Van Sickle wrote:
>> From:  Alex Martin
>>
>> Well, I was using a port monitor to debug some of the traffic 
>> between my serial device, and my software, when I noticed the 
>> output accidentally.
>>
>> I am not sure when the behavior started. It used to work 
>> fine, I was using printf to debug things, then I turned off 
>> all of those printf statements, and continued development on 
>> the gui side (fox toolkit) of my application, and then had to 
>> go in and modify my low level serial class and was trying to 
>> get my printf debug output again, to no avail.
>>
>> I have updated cygwin a few times, otherwise I cannot think 
>> of anything specific.
>>
>> What other details can I provide?
>>
> 
> Well, whatever details you have.  I'm still in "pull mode" here, which isn't
> conducive to problem-solving.  So far I've been able to gather:
> 
> 1.  You are developing some sort of app that communicates over a serial port
> to some other device.
> 2.  You "have a cygwin environment".
> 3.  The app has a GUI, using something called "fox toolkit" (with which I am
> not familiar).
> 4.  You had debug printf()s that used to work, then a bunch of stuff
> changed, and now they work differently.
> 
> A few gaps that need filling before anything better than SWAGs can come your
> way:
> - Is this app a Cygwin app, 

No, it is a windows app.

I am using cygwin primarily because I get the /dev/ttyS* devices. I 
could not find info on how to talk to a serial port in the windows world 
without using "MFC" which I refuse to touch.

or is Cygwin involved only perhiperally (e.g.
> you're using Cygwin make to run the MinGW toolchain), 

No mingw. Using all of cygwin's make, g++, etc.

or is Cygwin not
> directly involved at all and you're saying "My non-Cygwin-related app was
> working fine, I changed a bunch of stuff in the app and also upgraded
> Cygwin, and now the app is broke and I'm thinking Cygwin could be to blame"?

I do not think the app is broken. Somehow stdout is going to the serial 
port, my code relating to file descriptors (a serialio class that 
provides functions like open, close, read, write, flush), opening and 
closing the devices, etc has never changed (that is, the code is the 
same code since back when printf worked). Other code has changed, that 
is, the gui layout, function flow, etc.

> - Since your app is a GUI app, where did you expect your printf()s to go?

Well, someone taught me to use cygwin in this manner, and I have been 
doing so for a long time, that is, I can use a cygwin window to invoke 
my windows app, and the cygwin console would catch printfs (stdout 
chatter), so you can use it as a debug console.

> 
>> Alex Martin
>>
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

  reply	other threads:[~2008-12-19 21:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-19 18:02 Alex Martin
2008-12-19 19:31 ` Gary R. Van Sickle
2008-12-19 19:35   ` Matt Wozniski
2008-12-19 20:35     ` Alex Martin
2008-12-19 20:19   ` Alex Martin
2008-12-19 20:38     ` Gary R. Van Sickle
2008-12-19 21:01       ` Alex Martin [this message]
2008-12-19 21:23         ` Gary R. Van Sickle
2008-12-19 21:32         ` Larry Hall (Cygwin)
2009-01-04 19:22 Bob van Loosen
2009-01-04 21:30 ` Dave Korn
2009-01-04 21:45   ` Bob van Loosen

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=494C0B68.1040207@rettc.com \
    --to=alex@rettc.com \
    --cc=cygwin@cygwin.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).