This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch ping] suppress annoying warnings about cygwin1.dbg
- From: Brian Dessent <brian at dessent dot net>
- To: insight at sourceware dot org, gdb-patches at sourceware dot org
- Date: Wed, 02 May 2007 08:16:59 -0700
- 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>
- Reply-to: insight at sourceware dot org
[ Added gdb-patches@ since the revised patch touches files outside of
gdbtk/. See <http://sourceware.org/ml/insight/2007-q2/msg00016.html>
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 <brian@dessent.net>
>
> * ui-file.c (ui_file_isnull): New function.
> * ui-file.h (ui_file_isnull): Add declaration.
>
> gdb/gdbtk/
> 2007-04-18 Brian Dessent <brian@dessent.net>
>
> * generic/gdbtk-hooks.c (gdbtk_warning): Do not process the warning
> if gdb_stdout has been redirected to a null handle.
>