From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Kzi3J33rGmALXgAAWB0awg (envelope-from ) for ; Wed, 03 Feb 2021 13:29:17 -0500 Received: by simark.ca (Postfix, from userid 112) id 923D51EFCD; Wed, 3 Feb 2021 13:29:17 -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.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 401FF1E945 for ; Wed, 3 Feb 2021 13:29:17 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B75AE3896816; Wed, 3 Feb 2021 18:29:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B75AE3896816 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1612376956; bh=q/g0q9s8fevpIM5vAiIdU2v/RmjtkXzDm/srvs0Qt9c=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=KNpoICaHLJke06fpDjcqs2I/BJNkxqiImbk/FwbpllolN8oksdgp6VfWjbLkVk9cf L6MbCT6vsp5OKjbaHn4FMTjKGag0u0lOch392WSLc0qf1uwy/ELxhd8VRbM+bhZ/Mi uuTP5l55mMaVUI33mWJmvT7ufzcFVYhL59IKxPyA= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 6E1F6386F033 for ; Wed, 3 Feb 2021 18:29:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6E1F6386F033 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 113IT8Jx020452 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 3 Feb 2021 13:29:13 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 113IT8Jx020452 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id C1B6E1E945; Wed, 3 Feb 2021 13:29:08 -0500 (EST) Subject: Re: [PATCH][gdb/symtab] Fix duplicate CUs in create_cus_from_debug_names_list To: Tom de Vries , gdb-patches@sourceware.org References: <20210202113513.GA10112@delia> Message-ID: <160b7f2f-944e-d971-d5c9-43545ef392e1@polymtl.ca> Date: Wed, 3 Feb 2021 13:29:08 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <20210202113513.GA10112@delia> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 3 Feb 2021 18:29:08 +0000 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2021-02-02 6:35 a.m., Tom de Vries wrote: > Hi, > > When running test-case gdb.dwarf2/clang-debug-names.exp, I run into the > following warning: > ... > (gdb) file clang-debug-names^M > Reading symbols from clang-debug-names...^M > warning: Section .debug_aranges in clang-debug-names has duplicate \ > debug_info_offset 0xc7, ignoring .debug_aranges.^M > ... > > This is caused by a missing return in commit 3ee6bb113af "[gdb/symtab] Fix > incomplete CU list assert in .debug_names". > > Fix this by adding the missing return, such that we have instead this warning: > ... > (gdb) file clang-debug-names^M > Reading symbols from clang-debug-names...^M > warning: Section .debug_aranges in clang-debug-names \ > entry at offset 0 debug_info_offset 0 does not exists, \ > ignoring .debug_aranges.^M > ... > which is a known problem filed as PR25969 - "Ignoring .debug_aranges with > clang .debug_names". > > Tested on x86_64-linux. > > Any comments? > > Thanks, > - Tom > > [gdb/symtab] Fix duplicate CUs in create_cus_from_debug_names_list > > gdb/ChangeLog: > > 2021-02-02 Tom de Vries > > PR symtab/27307 > * dwarf2/read.c (create_cus_from_debug_names_list): Add missing > return. > > gdb/testsuite/ChangeLog: > > 2021-02-02 Tom de Vries > > PR symtab/27307 > * gdb.dwarf2/clang-debug-names.exp: Check file command warnings. > > --- > gdb/dwarf2/read.c | 1 + > gdb/testsuite/gdb.dwarf2/clang-debug-names.exp | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+) > > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > index 0a00f89cf6d..872b4e7bcf2 100644 > --- a/gdb/dwarf2/read.c > +++ b/gdb/dwarf2/read.c > @@ -5323,6 +5323,7 @@ create_cus_from_debug_names_list (dwarf2_per_bfd *per_bfd, > = create_cu_from_index_list (per_bfd, §ion, is_dwz, sect_off, 0); > per_bfd->all_comp_units.push_back (per_cu); > } > + return; > } I don't know the specific details of this, but from a quick glance it makes sense. It seems like two methods of patsing the CU table, we don't want to run through the two methods. I noticed the indentation is wrong in the code above, could you push a patch to fix that? Simon