Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 27 Jan 2004 15:07:23 -0500
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Cc: rs@atp.tuwien.ac.at
Subject: Re: gdb problem
Message-ID: <20040127200723.GB17793@redhat.com>
Mail-Followup-To: cygwin@cygwin.com, rs@atp.tuwien.ac.at
References: <401669D4.A0BD8676@atp.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <401669D4.A0BD8676@atp.tuwien.ac.at>
User-Agent: Mutt/1.4.1i
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com

On Tue, Jan 27, 2004 at 02:38:28PM +0100, RS wrote:
>>Don't use CYGWIN=tty when debugging.  It confuses the debugee.
>
>First of all thank you, it really helps when I start a shell using
>"cygwin\cygwin.bat".

Ok.  So, if you want to do this, then you will observe the behavior
that you mentioned.

>But I do not understand why it helps, because gdb is a unix program and
>I thought that
>problems with tty option may occur with Windows programs.
>Another point is that I commonly use
>"cygwin\usr\X11R6\bin\startxwin.bat" to start a shell.
>Here no CYGWIN environment variable is defined. Nevertheless I have the
>problem with
>gdb in this case.

Same problem.  gdb starts the debugee in a fashion that breaks the
understanding that "this pipe that is attached to stdin/stdout/stderr is
actually a tty/pty".  So, cygwin (or MSVCRT) assumes that you are attached
to a pipe and buffers input/output accordingly.

It's possible to modify gdb to work around this but that isn't going to
help you in the short term and I have no plans on doing this in the
short to medium term.

cgf

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

