From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 6DD4538582A2 for ; Mon, 4 Jul 2022 19:43:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6DD4538582A2 Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 3D043225A6; Mon, 4 Jul 2022 19:43:48 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2AF8B1342C; Mon, 4 Jul 2022 19:43:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id cziFCfRCw2JwSQAAMHmgww (envelope-from ); Mon, 04 Jul 2022 19:43:48 +0000 Message-ID: <50e85ba1-a050-f460-df4f-8bd3663b0c41@suse.de> Date: Mon, 4 Jul 2022 21:43:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH 2/5] [gdb/symtab] Fix data race on per_cu->dwarf_version Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20220629152914.13149-1-tdevries@suse.de> <20220629152914.13149-2-tdevries@suse.de> <58c8a00c-a931-8f97-ef05-66f404a6756a@suse.de> <2c75174c-8468-ba23-a30d-c8f99dc9589a@suse.de> <87y1x8u2xd.fsf@tromey.com> From: Tom de Vries In-Reply-To: <87y1x8u2xd.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jul 2022 19:43:51 -0000 On 7/4/22 20:51, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries 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