From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway31.websitewelcome.com (gateway31.websitewelcome.com [192.185.143.36]) by sourceware.org (Postfix) with ESMTPS id 7838B3858002 for ; Tue, 30 Mar 2021 05:02:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7838B3858002 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tom@tromey.com Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway31.websitewelcome.com (Postfix) with ESMTP id E73A99D975 for ; Tue, 30 Mar 2021 00:02:14 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id R6W6lPqnNb8LyR6W6lifbk; Tue, 30 Mar 2021 00:02:14 -0500 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tDg/AqtJDDtewoPccnPjzPGjkNai4VEQ30EeElRVr44=; b=keAGssIiK/Q7csWLpzrHgLzxXq BYofhxP7vLN7hY2UKhlkE0EfIreKhrpoNT0Y5StxxrD34FDEnK9WuqyhYGRIvN8rF8b6f1oSdFDOQ l4dpMSMN8BHLpQsG7rA4gQGHd; Received: from 71-211-130-165.hlrn.qwest.net ([71.211.130.165]:34806 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1lR6W6-002cXx-HW; Mon, 29 Mar 2021 23:02:14 -0600 From: Tom Tromey To: Joel Brobecker Cc: Simon Marchi , Simon Marchi , Tom Tromey , gdb-patches@sourceware.org Subject: Re: GDB 10.2 Release: Proposing Mar 13-14 for official GDB 10.2 release References: <20210306064611.GB807147@adacore.com> <06d96113-d09b-993f-0f55-00c297b4e591@simark.ca> <20210310024850.GA247585@adacore.com> <17184b08-d7e7-a62c-b689-35ab3f179f06@polymtl.ca> <20210316034551.GE3188@adacore.com> X-Attribution: Tom Date: Mon, 29 Mar 2021 23:02:13 -0600 In-Reply-To: <20210316034551.GE3188@adacore.com> (Joel Brobecker's message of "Tue, 16 Mar 2021 07:45:51 +0400") Message-ID: <875z19dyju.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 71.211.130.165 X-Source-L: No X-Exim-ID: 1lR6W6-002cXx-HW X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 71-211-130-165.hlrn.qwest.net (localhost.localdomain) [71.211.130.165]:34806 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3032.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, TXREP, T_SPF_TEMPERROR 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: Tue, 30 Mar 2021 05:02:17 -0000 >> diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c >> index 704ba9f36655..5d9256bece1e 100644 >> --- a/gdb/dwarf2/read.c >> +++ b/gdb/dwarf2/read.c >> @@ -1954,7 +1954,8 @@ dwarf2_has_info (struct objfile *objfile, >> doesn't require relocations and if there aren't partial symbols >> from some other reader. */ >> if (!objfile_has_partial_symbols (objfile) >> - && !gdb_bfd_requires_relocations (objfile->obfd)) >> + && !gdb_bfd_requires_relocations (objfile->obfd) >> + && 0) >> { >> /* See if one has been created for this BFD yet. */ >> per_bfd = dwarf2_per_bfd_bfd_data_key.get (objfile->obfd); >> >> We can then take our time to look at a proper fix for master. Joel> It's quite nice to see that this feature could be disabled with Joel> a one-liner like this. Joel> Unless Tom has other ideas, this seems like the way to go for me. Sorry I didn't respond to this earlier. I think it's fine for the branch. I came up with a complicated plan for the trunk, but after some reflection, I think a better plan is to notice OBJF_READNOW and refuse to do any sharing in this case. That is, it's your patch, but replacing "0" with a check of OBJF_READNOW. The appended probably has the wrong line numbers but it shows the idea. This -readnow stuff is an optimization, which in retrospect is kind of silly, because on the whole I'd rather people not use -readnow anyway, so why bother optimizing. But when I added the gdb-index code, I noticed the possibility and I guess I couldn't resist. Tom diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 11cdcd02d0a..ec044ab66e5 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1883,9 +1883,11 @@ dwarf2_has_info (struct objfile *objfile, { dwarf2_per_bfd *per_bfd; - /* We can share a "dwarf2_per_bfd" with other objfiles if the BFD - doesn't require relocations. */ - if (!gdb_bfd_requires_relocations (objfile->obfd)) + /* We can share a "dwarf2_per_bfd" with other objfiles if the + BFD doesn't require relocations, and if -readnow was never + requested. */ + if (!gdb_bfd_requires_relocations (objfile->obfd) + && (objfile->flags & OBJF_READNOW) == 0) { /* See if one has been created for this BFD yet. */ per_bfd = dwarf2_per_bfd_bfd_data_key.get (objfile->obfd);