From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.efficios.com (mail.efficios.com [167.114.26.124]) by sourceware.org (Postfix) with ESMTPS id 7970A3851C0B for ; Mon, 25 May 2020 19:53:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7970A3851C0B Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 3D1202C5001; Mon, 25 May 2020 15:53:20 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id hIgWCw7r6y3H; Mon, 25 May 2020 15:53:20 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 051E92C4C54; Mon, 25 May 2020 15:53:20 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.efficios.com 051E92C4C54 X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail03.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UcVTyr7JIraQ; Mon, 25 May 2020 15:53:19 -0400 (EDT) Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) by mail.efficios.com (Postfix) with ESMTPSA id E27B52C4D96; Mon, 25 May 2020 15:53:19 -0400 (EDT) Subject: Re: [PATCH v2 41/42] Make mapped_debug_names independent of objfile To: Tom Tromey , Simon Marchi via Gdb-patches References: <20200512210913.5593-1-simon.marchi@efficios.com> <20200512211824.6834-42-simon.marchi@efficios.com> <87imgn1y7c.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Mon, 25 May 2020 15:53:19 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <87imgn1y7c.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Mon, 25 May 2020 19:53:21 -0000 On 2020-05-22 5:01 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi via Gdb-patches writes: > > Simon> Ultimately, the objfile only seems to be needed because we might need to > Simon> read a string from the string section. For that, we might need to read > Simon> in the section, and if it's a relocatable section, the objfile is needed > Simon> in order to do the relocation. This pattern happens often (that we to > Simon> pass an objfile only because a section might be read). I think it's a > Simon> bit ugly, but I don't have a good alternative right now. > > A long time ago, I changed the DWARF reader to read all the sections > lazily. Off and on I've wondered whether that was actually a mistake. > For one thing, it requires passing stuff like this around. Also, it can > slow down hot paths, since they need to call the method to make sure the > section is mapped. There's also at least one bug in bugzilla related to > this (if you unlink a .so, gdb can be unhappy). > > For my threading project, I removed this lazy reading. We should > consider doing this sooner, perhaps. The idea here is just that, if gdb > is going to read the debuginfo anyway, then loading at least the > sections needed to read .debug_info makes sense. I think it would be interesting indeed. Can we try to revive it after the current patchset is merged? Simon