From patchwork Thu Jun 22 20:33:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 21211 Received: (qmail 51409 invoked by alias); 22 Jun 2017 20:33:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 51194 invoked by uid 89); 22 Jun 2017 20:33:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:796 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; Thu, 22 Jun 2017 20:33:13 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 16C955BED9 for ; Thu, 22 Jun 2017 20:33:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 16C955BED9 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jan.kratochvil@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 16C955BED9 Received: from host1.jankratochvil.net (ovpn-116-70.ams2.redhat.com [10.36.116.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7AA805C7A7 for ; Thu, 22 Jun 2017 20:33:11 +0000 (UTC) Date: Thu, 22 Jun 2017 22:33:08 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch+8.0] DWARF-5 Fix DW_FORM_implicit_const Message-ID: <20170622203308.GA23353@host1.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) Hi, the other possibility is to patch attr_form_is_constant() and dwarf2_get_attr_constant_value(), I do not see what is better. It fixes for example: FAIL: gdb.base/constvars.exp: ptype logical for -gdwarf-4 vs. -gdwarf-5. Jan gdb/ChangeLog 2017-06-22 Jan Kratochvil * dwarf2read.c (read_attribute_value) : Set it as DW_FORM_sdata. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2369d4b..77f870d 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -16775,6 +16775,7 @@ read_attribute_value (const struct die_reader_specs *reader, info_ptr); break; case DW_FORM_implicit_const: + attr->form = DW_FORM_sdata; DW_SND (attr) = implicit_const; break; case DW_FORM_GNU_addr_index: