This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 05/14] Introduce dwarf2_unshareable and move die_type_hash
On 2020-02-15 11:54 a.m., Tom Tromey wrote:
> The goal of this series is to share dwarf2_per_objfile across
> objfiles. However, this is difficult to do, because it has some
> members that are inherently per-objfile.
>
> This patch introduces a new "unshareable" object. The idea here is
> that we'll have one such object per objfile, and we'll temporarily
> update the pointer when needed. This is a bit ugly, but it's
> convenient, because it doesn't require a huge rewriting of the DWARF
> code. (I would be in favor of such a rewriting, but ... it's huge.)
>
> This patch further moves one such member, the DIE type hash, to the
> new structure.
>
> In this patch, the new object is managed by the dwarf2_per_objfile.
> However, by the end of the series, this will change.
So, in the end we'll have dwarf2_per_objfile, of which there will be only
one and will be shared between the objfiles, and dwarf2_unshareable of which
there will be N (for N objfiles), which won't be shared between the objfiles?
I find it a bit confusing, because now the object called "per_objfile" is not
per objfile.
Simon