Re: [PATCH v2 41.5/42] Move line_header_hash to dwarf2_per_objfile

Simon Marchi
2020-05-27T15:10:03Z

On 2020-05-27 11:07 a.m., Tom Tromey wrote:
>>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
>
> Simon> The `line_header_hash` field of `struct dwarf2_per_bfd` contains some
> Simon> `struct line_header` objects. A `struct line_header` objects contains
> Simon> some `file_entry` objects. A `file_entry` object contains a pointer to
> Simon> the `symtab` object created from it. The `line_header_hash` is
> Simon> therefore ultimately objfile-dependent and can't be shared as-is between
> Simon> objfiles.
>
> Simon> Move it from `dwarf2_per_bfd` to `dwarf2_per_objfile`.
>
> This patch looks good.
>
> I wonder how hard it would be to remove this symtab link and share these
> across objfiles. However, I don't think this is worth delaying the
> series for.

Same. I went for the obvious fix here, but once it's merged we can spend as much
time as we want to try to migrate stuff from dwarf2_per_objfile to dwarf2_per_bfd.

Thanks for the reviews!

Simon