From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30637 invoked by alias); 24 Oct 2007 18:42:14 -0000 Received: (qmail 30615 invoked by uid 22791); 24 Oct 2007 18:42:13 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 24 Oct 2007 18:42:10 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A1C369833F; Wed, 24 Oct 2007 18:42:08 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 7C837981F2; Wed, 24 Oct 2007 18:42:08 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IklB9-00032P-Dj; Wed, 24 Oct 2007 14:42:07 -0400 Date: Wed, 24 Oct 2007 19:06:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: gdb-patches@sourceware.org, insight@sourceware.org Subject: Re: syms_from_objfile() warnings and win32-nat.c IO redirection (Was: suppress annoying warnings about cygwin1.dbg) Message-ID: <20071024184207.GA10943@caradoc.them.org> Mail-Followup-To: Pedro Alves , gdb-patches@sourceware.org, insight@sourceware.org References: <46264A56.BA86EED7@dessent.net> <4638AB6B.5AA94B26@dessent.net> <46803846.F99470AE@dessent.net> <46804DAD.4020309@portugalmail.pt> <20070625234015.GA17640@caradoc.them.org> <46833EB0.E8ABC8CB@dessent.net> <20070628104601.GA10328@caradoc.them.org> <20071011195327.GB8200@caradoc.them.org> <470FFB00.9909C731@dessent.net> <47101DB4.6010204@portugalmail.pt> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47101DB4.6010204@portugalmail.pt> User-Agent: Mutt/1.5.15 (2007-04-09) 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-10/txt/msg00599.txt.bz2 On Sat, Oct 13, 2007 at 02:21:56AM +0100, Pedro Alves wrote: > if (lower_sect == NULL) > - warning (_("no loadable sections found in added symbol-file %s"), > - objfile->name); > - else > - if ((bfd_get_section_flags (objfile->obfd, lower_sect) & SEC_CODE) == 0) > - warning (_("Lowest section in %s is %s at %s"), > - objfile->name, > - bfd_section_name (objfile->obfd, lower_sect), > - paddr (bfd_section_vma (objfile->obfd, lower_sect))); > - if (lower_sect != NULL) > - lower_offset = bfd_section_vma (objfile->obfd, lower_sect); > - else Removing these warnings seems reasonable. I'll be glad to be rid of them on GNU/Linux too: warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4 > + else > + { > + int flags = bfd_get_section_flags (objfile->obfd, lower_sect); > + if (flags == 0) > + warning (_("Lowest section in %s is %s at %s"), > + objfile->name, > + bfd_section_name (objfile->obfd, lower_sect), > + paddr (bfd_section_vma (objfile->obfd, lower_sect))); > + > + lower_offset = bfd_section_vma (objfile->obfd, lower_sect); > + } But why are you keeping this warning? I'm not sure what flags == 0 checks, but it's very unlikely to be true; most sections will have SEC_READONLY set. > @@ -860,12 +860,7 @@ syms_from_objfile (struct objfile *objfi > addrs->other[i].sectindex = sect->index ; > } > else > - { > - warning (_("section %s not found in %s"), > - addrs->other[i].name, > - objfile->name); > - addrs->other[i].addr = 0; > - } > + addrs->other[i].addr = 0; > } > else > addrs->other[i].addr = lower_offset; I know you needed this one before because win32-nat.c specified an offset for .text manually. I don't think it does so any more, though. This one's useful, since you can provoke it with a typo: (gdb) add-symbol-file cat 1000 -s .dataz 24 add symbol table from file "cat" at .text_addr = 0x3e8 .dataz_addr = 0x18 (y or n) y Reading symbols from /bin/cat...warning: section .dataz not found in /bin/cat -- Daniel Jacobowitz CodeSourcery