From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 85766 invoked by alias); 12 Jun 2017 09:56:18 -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 85358 invoked by uid 89); 12 Jun 2017 09:56:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_1,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Jun 2017 09:56:17 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54538C0587CD; Mon, 12 Jun 2017 09:56:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 54538C0587CD Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=nickc@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 54538C0587CD Received: from [10.36.117.1] (ovpn-117-1.ams2.redhat.com [10.36.117.1]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA45917536; Mon, 12 Jun 2017 09:56:15 +0000 (UTC) Subject: Re: [binutils patch] DWARF-5: readelf: .debug_names To: Jan Kratochvil Cc: binutils@sourceware.org, gdb-patches@sourceware.org References: <20170526181552.GA15442@host1.jankratochvil.net> <8d6d8339-8fbe-9ac1-5e97-84fcbd264215@redhat.com> <20170610071349.GA13161@host1.jankratochvil.net> From: Nick Clifton Message-ID: Date: Mon, 12 Jun 2017 09:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170610071349.GA13161@host1.jankratochvil.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00302.txt.bz2 Hi Jan, > thanks for the approval but I cannot check it in yet as it depends on: > [gcc patch] DWARF-5: Define DW_IDX_GNU_static and DW_IDX_GNU_external OK. >>> + printf (_("Version %ld\n"), (long) dwarf_version); >>> + if (dwarf_version != 5) >> >> Shouldn't this test be for >= 5 ? > > 0..4: Such .debug_names format has never been defined anywhere. > 5: The supported version. > 6..65535: Their format may/will change, I do not think readelf should attempt > decoding future unknown data format. > > It is written similarly as .gdb_index version check is written: > /* Prior versions are obsolete, and future versions may not be > backwards compatible. */ > if (version < 3 || version > 8) > { > warn (_("Unsupported version %lu.\n"), (unsigned long) version); > return 0; > } Fair enough - but please could you add a comment to this effect so that future readers of the code do wonder about the version check. Cheers Nick