From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12121 invoked by alias); 2 May 2007 15:19:09 -0000 Received: (qmail 12095 invoked by uid 22791); 2 May 2007 15:19:07 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 02 May 2007 15:17:01 +0000 Received: from localhost ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1HjGZf-0004lL-Dq; Wed, 02 May 2007 15:16:59 +0000 Message-ID: <4638AB6B.5AA94B26@dessent.net> Date: Wed, 02 May 2007 15:19:00 -0000 From: Brian Dessent Reply-To: insight@sourceware.org X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: insight@sourceware.org, gdb-patches@sourceware.org Subject: [patch ping] suppress annoying warnings about cygwin1.dbg References: <46262D3A.8B1A0D15@dessent.net> <20070418150137.GA7338@trixie.casa.cgf.cx> <46263710.D9755DAD@dessent.net> <462639F3.FBCF4675@dessent.net> <46264A56.BA86EED7@dessent.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00035.txt.bz2 [ Added gdb-patches@ since the revised patch touches files outside of gdbtk/. See for context. ] Brian Dessent wrote: > > > How about a patch that modifies gdbtk-hooks.c:gdbtk_warning() such that > > > instead of just blindly punting everything to gdbtk_tcl_warning(), it > > > first tries to check if stdout has been redirected to a null handle, and > > > just skip the warning if so? That would let the exiting stuff in > > > win32-nat.c take care of suppressing these without any regexps. > > > > See attached. > > Arg, that won't work. Simply checking ui_file_data (gdb_stdout) != NULL > is no good because even when gdb_stdout is not redirected its data > member can be NULL. The only reliable way I could figure out to > determine if the stdout was redirected was to add an interface to > ui-file.c that checks if both the fputs and write functions were the > null functions. See attached. Ping? Comments? > ------------------------------------------------------------------------ > gdb/ > 2007-04-18 Brian Dessent > > * ui-file.c (ui_file_isnull): New function. > * ui-file.h (ui_file_isnull): Add declaration. > > gdb/gdbtk/ > 2007-04-18 Brian Dessent > > * generic/gdbtk-hooks.c (gdbtk_warning): Do not process the warning > if gdb_stdout has been redirected to a null handle. >