From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 56D1A3858D38 for ; Mon, 30 Jan 2023 21:12:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 56D1A3858D38 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: by gnu.wildebeest.org (Postfix, from userid 1000) id 4F66C30067B1; Mon, 30 Jan 2023 22:12:56 +0100 (CET) Date: Mon, 30 Jan 2023 22:12:56 +0100 From: Mark Wielaard To: elfutils-devel@sourceware.org Subject: Re: [PATCH] libdw: Search for abstract origin in the correct CU Message-ID: <20230130211256.GD11361@gnu.wildebeest.org> References: <20230123091520.688326-1-mark@klomp.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230123091520.688326-1-mark@klomp.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-3031.7 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On Mon, Jan 23, 2023 at 10:15:20AM +0100, Mark Wielaard wrote: > With gcc -flto the abstract origin of an inlined subroutine > could be in a different CU. dwarf_getscopes might return an > empty scope if it cannot find the abstract origin scope. So > make sure to search in the > > We also tried to add the origin match in pc_record directly > in the current inlined scope. This always failed, causing > to do a needless traversal, followed by the full CU scan in > dwarf_getscopes. Just always stop the pc_record search and > then do the CU origin_match in dwarf_getscopes. Pushed. Cheers, Mark