[PATCH 2/5] [gdb/symtab] Fix data race on per_cu->dwarf_version

Tom de Vries tdevries@suse.de
Mon Jul 4 19:43:47 GMT 2022


On 7/4/22 20:51, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
> 
> Tom> Fix this by setting the field earlier, in read_comp_units_from_section.
> 
> Thanks.
> 
> Tom> The write in cutu_reader::cutu_reader() is still needed, in case
> Tom> read_comp_units_from_section is not used (run the test-case with say, target
> Tom> board cc-with-gdb-index).
> 
> I wonder if we should just change this code to always scan the DWARF
> just enough to read the headers.  Like, would that really be so much
> slower?  (Eons ago I thought so but now I don't really know.)  If it
> would simplify the code it seems like it would be a net win.

I wondered the same, but then including the top-level die.  That would 
allow us to get the language before going into the parallel for.  But I 
suppose that's more complex than just the headers.

Thanks,
- Tom


More information about the Gdb-patches mailing list