delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/22/03:43:23

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 22 May 2001 11:41:13 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.45) Personal
Reply-To: egor duda <cygwin AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <57497665435.20010522114113@logos-m.ru>
To: "Topas" <yrwang AT cc DOT nctu DOT edu DOT tw>
CC: cygwin AT cygwin DOT com
Subject: Re: stdout in gdb
In-reply-To: <NFBBJHGBKLKEAOHMECHMAEDDCAAA.yrwang@cc.nctu.edu.tw>
References: <NFBBJHGBKLKEAOHMECHMAEDDCAAA DOT yrwang AT cc DOT nctu DOT edu DOT tw>
Mime-Version: 1.0

Hi!

Tuesday, 22 May, 2001 Topas yrwang AT cc DOT nctu DOT edu DOT tw wrote:

T> Whenever I run a program under gdb, I find that the stdout is
T> full-buffered. So, I write a simple program to check the problem,

T> int main()
T> {
T> printf("%s\n", ttyname(1));
T> printf("%d\n", isatty(1));
T> printf("%d\n", stdout->_flags & 0x0001);
T> return 0;
T> }

T> the output of the program is
T> /dev/tty0
T> 1
T> 1

T> but when I run the program under gdb, the output becomes
T> (null)
T> 0
T> 0

T> Is there any options/setting I miss in gdb? 

probably.

(gdb) set new-console

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019