From patchwork Tue Oct 17 21:38:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Seitz X-Patchwork-Id: 23653 Received: (qmail 26450 invoked by alias); 17 Oct 2017 21:38:35 -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 25717 invoked by uid 89); 17 Oct 2017 21:38:35 -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, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=wisely 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; Tue, 17 Oct 2017 21:38:34 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DE62BFED0 for ; Tue, 17 Oct 2017 21:38:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com DE62BFED0 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=keiths@redhat.com Received: from valrhona.Home (ovpn04.gateway.prod.ext.phx2.redhat.com [10.5.9.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA9B860F86 for ; Tue, 17 Oct 2017 21:38:32 +0000 (UTC) From: Keith Seitz To: gdb-patches@sourceware.org Subject: [PATCH] Issue complaint instead of assert for invalid/unhandled DW_AT_accessibility Date: Tue, 17 Oct 2017 14:38:32 -0700 Message-Id: <1508276312-7910-1-git-send-email-keiths@redhat.com> In-Reply-To: <9431dc9a-2156-10d7-8fbd-b46d5af9a72f@redhat.com> References: <9431dc9a-2156-10d7-8fbd-b46d5af9a72f@redhat.com> X-IsSubscribed: yes A previous patch called gdb_assert_not_reached whenever reading the accessibility of a nested typedef definition. Wisely, Pedro has asked me not do this. This patch changes the previous one so that it issues a complaint instead. gdb/ChangeLog: * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled DW_AT_accessibility. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e16b048..4afd897 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2017-10-17 Keith Seitz + + * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled + DW_AT_accessibility. + 2017-10-17 Tom Tromey * disasm.c (do_mixed_source_and_assembly_deprecated): Use diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index f27d9b9..686fa3f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -13131,7 +13131,8 @@ dwarf2_add_typedef (struct field_info *fip, struct die_info *die, fp->is_protected = 1; break; default: - gdb_assert_not_reached ("unexpected accessibility attribute"); + complaint (&symfile_complaints, + _("Unhandled DW_AT_accessibility value (%x)"), accessibility); } new_field->next = fip->typedef_field_list;