From patchwork Thu Dec 12 23:50:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Simon Marchi (Code Review)" X-Patchwork-Id: 36813 Received: (qmail 101957 invoked by alias); 12 Dec 2019 23:50:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 101460 invoked by uid 89); 12 Dec 2019 23:50:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=shared_ptr X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2019 23:50:24 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id D4C3F206E6; Thu, 12 Dec 2019 18:50:23 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [8.43.85.239]) by mx1.osci.io (Postfix) with ESMTP id 51DC120C7E; Thu, 12 Dec 2019 18:50:11 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 1B2F62817E; Thu, 12 Dec 2019 18:50:11 -0500 (EST) X-Gerrit-PatchSet: 2 Date: Thu, 12 Dec 2019 18:50:11 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Tom Tromey , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Change objfile::partial_symtabs to be a unique_ptr X-Gerrit-Change-Id: I3d7831006c40d4c8f3173ba51c0c1b0a32021ae5 X-Gerrit-Change-Number: 502 X-Gerrit-ChangeURL: X-Gerrit-Commit: e671856cb804c977650aaeb4107948a7b963e9e9 In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, tromey@sourceware.org, gdb-patches@sourceware.org MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191212235011.1B2F62817E@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/502 ...................................................................... Change objfile::partial_symtabs to be a unique_ptr A plan I had a while ago was to write the DWARF index in a worker thread. This is why objfile::partial_symtabs is a shared_ptr. However, it turned out that doing this required keeping the objfile alive as well. Now that objfiles are managed using shared_ptr, there's no need for partial_symtabs to be one as well, so this patch reverts that change. gdb/ChangeLog 2019-12-12 Tom Tromey * objfiles.h (struct objfile) : Now a unique_ptr. Change-Id: I3d7831006c40d4c8f3173ba51c0c1b0a32021ae5 --- M gdb/ChangeLog M gdb/objfiles.h 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8c26bb0..ecd2124 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2019-12-12 Tom Tromey + * objfiles.h (struct objfile) : Now a + unique_ptr. + +2019-12-12 Tom Tromey + * progspace.h (objfile_list): New typedef. (class unwrapping_objfile_iterator) (struct unwrapping_objfile_range): Newl diff --git a/gdb/objfiles.h b/gdb/objfiles.h index f0ee803..9a433dd 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -518,7 +518,7 @@ /* The partial symbol tables. */ - std::shared_ptr partial_symtabs; + std::unique_ptr partial_symtabs; /* The object file's BFD. Can be null if the objfile contains only minimal symbols, e.g. the run time common symbols for SunOS4. */