From e671856cb804c977650aaeb4107948a7b963e9e9 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 3 Nov 2019 15:22:01 -0700 Subject: [PATCH] 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 --- gdb/ChangeLog | 5 +++++ gdb/objfiles.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8c26bb06add..ecd21247200 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-12-12 Tom Tromey + + * objfiles.h (struct objfile) : Now a + unique_ptr. + 2019-12-12 Tom Tromey * progspace.h (objfile_list): New typedef. diff --git a/gdb/objfiles.h b/gdb/objfiles.h index f0ee8037b6d..9a433ddd7b0 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -518,7 +518,7 @@ public: /* 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. */ -- 2.30.2