[PATCH 2/5] [gdb/symtab] Fix data race on per_cu->dwarf_version
Tom Tromey
tom@tromey.com
Mon Jul 4 19:53:57 GMT 2022
>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:
Tom> 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.
Tom> I wondered the same, but then including the top-level die. That would
Tom> allow us to get the language before going into the parallel for. But
Tom> I suppose that's more complex than just the headers.
Yeah, that's harder since it would have to read abbrevs, etc.
This part of the reader is a real mess. There is a seemingly redundant
copy of the header info as well, used by DWO. This is surprisingly hard
to untangle :(
Tom
More information about the Gdb-patches
mailing list