This is the mail archive of the
insight@sourceware.org
mailing list for the Insight project.
Re: [patch] suppress annoying warnings about cygwin1.dbg
Christopher Faylor wrote:
> Cygwin really isn't doing anything terrifically special with its use of
> .dbg, AFAIK. So, it seems to me that, if this is fixed, it should be fixed
> in a generic fashion so that everyone can benefit.
It's easy enough to change the regexp so that it matches any filename; I
had it only matching cygwin*.dbg just to be conservative. The problem
then becomes that if there was ever a situation where this message was
legitimately desired, now you don't get it. And by matching only
cygwin*.dbg, I carefully avoid the problem of not stepping on the toes
of other platforms that don't have this problem at all, where that
message might not be bogus.
Of course, the "generic fashion" already exists in the form of
win32-nat.c:safe_symbol_file_add(), which knows to turn off all warnings
and re-enable them again at the right place. But this information is
never conveyed to the Insight frontend, so it's left to guess everything
based on regexps.
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.
Brian