From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24193 invoked by alias); 19 Feb 2008 16:39:05 -0000 Received: (qmail 24184 invoked by uid 22791); 19 Feb 2008 16:39:04 -0000 X-Spam-Check-By: sourceware.org Received: from mail.artimi.com (HELO mail.artimi.com) (194.72.81.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Feb 2008 16:38:44 +0000 Received: from mail.artimi.com ([192.168.1.3] RDNS failed) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 19 Feb 2008 16:38:41 +0000 Received: from rainbow ([192.168.8.46]) by mail.artimi.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 19 Feb 2008 16:38:40 +0000 From: "Dave Korn" To: "'Gordon Prieur'" , References: <47BB0490.6070703@sun.com> Subject: RE: Question about when stdout is flushed in gdb/mi mode Date: Tue, 19 Feb 2008 17:52:00 -0000 Message-ID: <007701c87315$e23a7b10$2e08a8c0@CAM.ARTIMI.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <47BB0490.6070703@sun.com> Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00130.txt.bz2 On 19 February 2008 16:32, Gordon Prieur wrote: > Looking at the gdb options, I don't see anyway of forcing a > flush of stdout. Since stdout isn't a variable and libc is typically > optimized without debug information, neither "fflush(stdout)" nor > "fflush(&__iob[1])" work. Is there anyway to force gdb to flush > stdout when it stops? You could always rely on the default behaviour of "fflush (NULL)", if you don't mind other descriptors getting flushed too. cheers, DaveK -- Can't think of a witty .sigline today....