From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7345 invoked by alias); 15 Jul 2002 16:42:22 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7337 invoked from network); 15 Jul 2002 16:42:20 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 15 Jul 2002 16:42:20 -0000 Received: from dsl254-114-096.nyc1.dsl.speakeasy.net ([216.254.114.96] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17U8vO-0005QZ-00; Mon, 15 Jul 2002 11:42:14 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17U8vM-0005ux-00; Mon, 15 Jul 2002 12:42:12 -0400 Date: Mon, 15 Jul 2002 09:42:00 -0000 From: Daniel Jacobowitz To: Pierre Muller Cc: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] avoid spurious Watchpoint X output on cygwin native target. Message-ID: <20020715164212.GA22578@nevyn.them.org> Mail-Followup-To: Pierre Muller , gdb-patches@sources.redhat.com References: <4.2.0.58.20020715174048.02a55688@ics.u-strasbg.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4.2.0.58.20020715174048.02a55688@ics.u-strasbg.fr> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00326.txt.bz2 On Mon, Jul 15, 2002 at 06:15:01PM +0200, Pierre Muller wrote: > > The following patch suppresses all > spurious output when a DLL is loaded in native cygwin GDB. > > Its a RFC for two reasons: > > First reason: > Question: Why do we currently get ouptut while loading a DLL > while the safe_symbol_file_add does redefine gdb_stdout and > gdbstderr to dummy output exactly to suppress all output? > > Answer: Because, despite gdb_stdout is redefined as a > dummy file does noting with the strings it gets > (and thus is a correct way of suppressing ouptut > sent to gdb_stdout), the Watchpoint X... > message is sent to uiout struct > (see mention function in breakpoint.c source) > The only question here is if a change of gdb_stdout should not > also change the global uiout variable behavior. > This could easily be achieved by replacing > the stream field of the data field of ui_out struct into a > '** ui_file' instead of a simple '*ui_file'. > > Is that complete nonsense, or does it seem logical to someone? > > (One argument for this is that you get the same unwanted output on > loading of shared libraries on linux for instance ...) > > > Here is the win32 specific patch and the associated changelog. > > 2nd reason: It does not free the uiout struct created because I didn't find > how to free this cleanly. This is an amusing coincidence, I discovered the same thing yesterday, working on a different patch. I believe that uiout should write to gdb_stdout no matter what instead of saving a stream, and that things which wish to change where output goes should redirect gdb_stdout. Your patch is definitely suspect, because the current uiout might not be CLI; I don't know that it matters for your case, although it definitely did for mine. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer