[patch] suppress annoying warnings about cygwin1.dbg

Christopher Faylor cgf-use-the-mailinglist-please@sourceware.org
Wed Apr 18 15:01:00 GMT 2007


On Wed, Apr 18, 2007 at 07:37:46AM -0700, Brian Dessent wrote:
>
>If you use Insight with Cygwin, you are treated to two extremely
>annoying pop-up warnings every time you debug any program:
>
>section .text not found in /bin/cygwin1.dbg
>no loadable sections found in added symbol-file /bin/cygwin1.dbg
>
>This is because the debug symbols for the Cygwin DLL itself are handled
>specially.  The DLL has only a .gnu_debuglink section which points to an
>external file that holds the symbols, cygwin1.dbg.  This file contains
>only debug sections, no code, and thus every time gdb reads it with bfd,
>it issues these warnings in symfile.c:syms_from_objfile().
>
>When using the plain gdb front-end, stdout and stderr have been
>conveniently redirected to /dev/null by
>win32-nat.c:safe_symbol_file_add().  However, since Insight hooks
>warning() through gdbtk_warning(), it gets all messages and doesn't know
>to ignore them.  This patch just adds a regexp in gdbtk_tcl_warning to
>filter these messages.  I can think of cleaner solutions to doing this,
>such as having gdbtk_warning() check stdout/stderr, but it looks like
>this is the established way of doing things so here it is.

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.

cgf



More information about the Insight mailing list