From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88600 invoked by alias); 4 Nov 2019 20:49:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 88591 invoked by uid 89); 4 Nov 2019 20:49:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1634 X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Nov 2019 20:49:31 +0000 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 xA4KnMgl012146 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 4 Nov 2019 15:49:27 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca xA4KnMgl012146 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1572900568; bh=gP4luHoIj5g2zeU8BRGZGg4j3aTMS/eYXtG+V9bExJQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=RZ/7Z4WGAJydRv82z/DpLFift8B/siNBERyqL8YhRnSbPGRochK6tUlee1EsjjjB3 uO1myjf3zHeQcXoiB0RQQCVPJbUwS/iaX5Br0Jwx1yxKP5k6gD4NJE6tO7MzdwnoPL 5qVPB386etm7yVfh7noZuf6l9p4EAaIQ/0+/vUeI= Received: from [172.16.0.155] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 625E11E47D; Mon, 4 Nov 2019 15:49:22 -0500 (EST) Subject: Re: [PATCH 1/2] Fix BZ 25065 - Ensure that physnames are computed for inherited DIEs To: Kevin Buettner Cc: gdb-patches@sourceware.org, Keith Seitz References: <20191014001842.27413-1-kevinb@redhat.com> <20191014001842.27413-2-kevinb@redhat.com> <8c073683bc0b0a8e7918fdfb346cbb03@polymtl.ca> <20191015092743.7037f47c@f29-4.lan> <20191017180851.7db69958@f29-4.lan> <8b301205-e8f6-ead5-0484-eacfb82e5b7a@polymtl.ca> <20191022152307.37dea0d1@f29-4.lan> From: Simon Marchi Message-ID: <5cd863fe-979c-3913-13ff-0ed516eae622@polymtl.ca> Date: Mon, 04 Nov 2019 20:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191022152307.37dea0d1@f29-4.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00104.txt.bz2 On 2019-10-22 6:23 p.m., Kevin Buettner wrote: > On Fri, 18 Oct 2019 11:07:31 -0400 > Simon Marchi wrote: > >>> I looked over your patch; it looks reasonable to me. If we go that >>> route, I like the idea of introducing a dwarf2_cu_processing_context >>> struct. (But see below for some later misgivings that I have/had.) >> >> Ok, I can try to make something cleaner, but I don't know when it >> would be ready, and I wouldn't want that to block the GDB 9.1 branch >> creation (or release) for that. Would you like to still push your >> patch (or a perhaps updated version of it) so that we have the fix >> in GDB 9.1? > > [...] > >>> There may be other concerns too; I'm certain that I didn't look at all >>> of the ways that CU is used in dwarf2_physname and its callees. >> >> I don't think it's humanly possible to manually check all the >> possible branches this code can take. I say, let's do a quick pass >> to check for the obvious (like what you found above), but otherwise >> I'm fine with this patch, it already makes things better than they >> are now. > > My testing shows that the patch below still fixes the problem while > also avoiding the poential problems of passing a CU to > compute_delayed_physnames() which is different from the CU of the > methods for which want to compute physnames. > > I think that this patch is safer than the one I originally proposed > and is, therefore, a better short term solution. > > What do you think? Yep, this looks good and relatively safe to me. Thanks! Simon