From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31549 invoked by alias); 14 Aug 2013 11:25:45 -0000 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 Received: (qmail 31529 invoked by uid 89); 14 Aug 2013 11:25:44 -0000 X-Spam-SWARE-Status: No, score=-8.3 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 14 Aug 2013 11:25:44 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7EBPgKo015060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 14 Aug 2013 07:25:42 -0400 Received: from [10.36.6.185] (vpn1-6-185.ams2.redhat.com [10.36.6.185]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7EBPeH8003062 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 14 Aug 2013 07:25:41 -0400 Message-ID: <520B689A.6030908@redhat.com> Date: Wed, 14 Aug 2013 11:25:00 -0000 From: nick clifton User-Agent: Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20100101 Firefox/22.0 SeaMonkey/2.19 MIME-Version: 1.0 To: Tom Tromey , gdb-patches@sourceware.org CC: binutils@sourceware.org Subject: Re: [PATCH] fix PR symtab/15597 References: <1375983426-19308-1-git-send-email-tromey@redhat.com> In-Reply-To: <1375983426-19308-1-git-send-email-tromey@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-08/txt/msg00375.txt.bz2 Hi Tom, > This patch touches BFD. Previously, gdb had its own code for parsing > .gnu_debugaltlink; I changed it to use the BFD functions after those > were introduced. However, the BFD functions are incorrect -- they > assume that .gnu_debugaltlink is formatted like .gnu_debuglink. > However, it it is not. Instead, it consists of a file name followed > by the build-id -- no alignment, and the build-id is not a CRC. > > Fixing this properly is a bit of a pain. But, because > separate_alt_debug_file_exists just has a FIXME for the build-id case, > I did not fix it properly. Instead I introduced a hack. This leaves > BFD working just as well as it did before my patch. > > I'm willing to do something better here but I could use some guidance > as to what. It seems that the build-id code in BFD is largely punted > on. True - it would be nice to see this fixed, but it can be left for a future patch. > * bfd-in2.h: Rebuild. > * opncls.c (bfd_get_alt_debug_link_info): Add buildid_len > parameter. Change type of buildid_out. Update. > (get_alt_debug_link_info_shim): New function. > (bfd_follow_gnu_debuglink): Use it. > > * Makefile.in (SFILES): Add build-id.c. > (HFILES_NO_SRCDIR): Add build-id.h. > * build-id.c: New file, largely from elfread.c. Modified > most functions. > * build-id.h: New file. > * dwarf2read.c (dwarf2_get_dwz_file): Update for change to > bfd_get_alt_debug_link_info. Verify dwz file's build-id. > Search for dwz file using build-id. > * elfread.c (build_id_bfd_get, build_id_verify) > (build_id_to_debug_filename, find_separate_debug_file): Remove. > Approved - please apply. Cheers Nick