From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rzSAKgQOJWC7JgAAWB0awg (envelope-from ) for ; Thu, 11 Feb 2021 05:59:16 -0500 Received: by simark.ca (Postfix, from userid 112) id 9F6451EF5D; Thu, 11 Feb 2021 05:59:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 2E3561E789 for ; Thu, 11 Feb 2021 05:59:16 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6E112384A4BF; Thu, 11 Feb 2021 10:59:15 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8BB9B385781C for ; Thu, 11 Feb 2021 10:59:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8BB9B385781C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id AE6E7AE3F for ; Thu, 11 Feb 2021 10:59:12 +0000 (UTC) Date: Thu, 11 Feb 2021 11:59:11 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH][gdb/symtab] Handle DW_FORM_strx in form_requires_reprocessing Message-ID: <20210211105909.GA22945@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" Hi, When running test-case gdb.dwarf2/fission-mix.exp using gcc-11, I run into: ... (gdb) file fission-mix^M Reading symbols from fission-mix...^M src/gdb/dwarf2/attribute.h:258: internal-error: \ void attribute::set_unsigned_reprocess(ULONGEST): \ Assertion `form_requires_reprocessing ()' failed.^M ... This happens when calling set_unsigned_reprocess on an attribute with form DW_FORM_strx. The assert triggers because DW_FORM_strx is not listed in form_requires_reprocessing. Fix this by adding DW_FORM_strx in form_requires_reprocessing. Tested on x86_64-linux. Any comments? Thanks, - Tom [gdb/symtab] Handle DW_FORM_strx in form_requires_reprocessing gdb/ChangeLog: 2021-02-09 Tom de Vries PR symtab/27353 * dwarf2/attribute.c (attribute::form_requires_reprocessing): Return true for DW_FORM_strx. --- gdb/dwarf2/attribute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdb/dwarf2/attribute.c b/gdb/dwarf2/attribute.c index b4f188a096e..3205b0f7d29 100644 --- a/gdb/dwarf2/attribute.c +++ b/gdb/dwarf2/attribute.c @@ -192,7 +192,8 @@ attribute::form_is_unsigned () const bool attribute::form_requires_reprocessing () const { - return (form == DW_FORM_strx1 + return (form == DW_FORM_strx + || form == DW_FORM_strx1 || form == DW_FORM_strx2 || form == DW_FORM_strx3 || form == DW_FORM_strx4