From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8422 invoked by alias); 9 Sep 2010 14:56:32 -0000 Received: (qmail 8126 invoked by uid 22791); 9 Sep 2010 14:56:28 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Sep 2010 14:56:20 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o89EuIjg030528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Sep 2010 10:56:19 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o89EuGVP025430 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Sep 2010 10:56:18 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o89EuGKO006051; Thu, 9 Sep 2010 16:56:16 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o89EuFgs006050; Thu, 9 Sep 2010 16:56:15 +0200 Date: Thu, 09 Sep 2010 16:11:00 -0000 From: Jan Kratochvil To: Doug Evans Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [patch] Fix ELF stale reference [Re: [patch] .gdb_index: Do not crash on NOBITS] Message-ID: <20100909145615.GA5771@host1.dyn.jankratochvil.net> References: <20100908185837.GA24606@host1.dyn.jankratochvil.net> <20100909090511.GA937@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-09/txt/msg00200.txt.bz2 On Thu, 09 Sep 2010 16:51:51 +0200, Doug Evans wrote: > On Thu, Sep 9, 2010 at 2:05 AM, Jan Kratochvil wrote: > > --- a/gdb/elfread.c > > +++ b/gdb/elfread.c > > @@ -37,6 +37,7 @@ > > +#include "libbfd.h" > > Apologies for nitpicking but this raises an issue I'd like to understand better. > I thought libbfd.h was an internal bfd header. > [I know I've wanted to use it at least once and been told "No." :-)] I have seen amd64-darwin-tdep.c:#include "libbfd.h" i386-darwin-tdep.c:#include "libbfd.h" rs6000-nat.c:#include "libbfd.h" /* For bfd_default_set_arch_mach (FIXME) */ rs6000-tdep.c:#include "libbfd.h" /* for bfd_default_set_arch_mach */ so I considered it legal. OTOH this patch is not completely clean, it can needlessly allocate bfd-associated memory and the right fix would probably span into bfd/ IMO. Thanks, Jan