From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CUEcIiCt7mhhaDIAWB0awg (envelope-from ) for ; Tue, 14 Oct 2025 16:05:52 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=fDvryDDu; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 85A7E1E047; Tue, 14 Oct 2025 16:05:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 237501E047 for ; Tue, 14 Oct 2025 16:05:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AF084385841E for ; Tue, 14 Oct 2025 20:05:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF084385841E Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=fDvryDDu Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 21C1F3858D35 for ; Tue, 14 Oct 2025 20:05:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 21C1F3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 21C1F3858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760472316; cv=none; b=mJXVp6VRGkVoh6QxHbFcDTyF/d+SB/2olQuMcWxYoVuwjYb6urES8EStxp1hj0MBDQhyUDSVxqi1PGdL7KPx/0hIj9o/kgatIQRt0Iyjg1QtLwazPDrBRs/U03ktmPIDo+uBKUKoWkUMX0kaAApu5mRgIoTijKL4o/0p34kRy8g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1760472316; c=relaxed/simple; bh=sz+fSB1xO0DJI3nR8+4UcGNPiGN6w900REH9sTcgsTg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gmhkSKNPUf6IZWgbGFieWwaw6FFrmzJu+JRBB2NIRrJmMZvkQrptfoHScPV7HMIZngpk/B1GO2D0UqyoGZ4g36Gsj/313gfRI4qfWDMjffoXuniIVuRAcatV7XOs6HVX6MGUE4VRW5yDbvl2EZqeifBTyVkCaeM1eAg59sdzyAE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21C1F3858D35 Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id 8eAHvuxBZv7248lGlvNgNY; Tue, 14 Oct 2025 20:05:15 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id 8lGgvzLRRtssb8lGgvJrh8; Tue, 14 Oct 2025 20:05:11 +0000 X-Authority-Analysis: v=2.4 cv=Hb8UTjE8 c=1 sm=1 tr=0 ts=68eeacfb a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=x6icFKpwvdMA:10 a=ItBw4LHWJt0A:10 a=dzWzf_mpAAAA:8 a=V1JER-AG1437JsGIcYEA:9 a=b4DR9a7p2ZdsqdHBznES:22 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=o5lj2UplvIyQcSi3qMXxEgzmG+hmC89YNITn03QP+2M=; b=fDvryDDu5FGPczwf4ob8B0r0HF ocLOyFMyAMGx7Kat50tI330VNzXem0EtJwCR+cwEq/sQkXaxK63rMm0I7zeq2ebyz46MZlrKTJ8Jh 1T9cAW7nz7JCjOrhi3v2OsY7S; Received: from 97-122-110-68.hlrn.qwest.net ([97.122.110.68]:58036 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1v8lGf-00000003rnl-2Zwl; Tue, 14 Oct 2025 14:05:10 -0600 From: Tom Tromey To: Simon Marchi Cc: Jan Vrany , gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] gdb: use std::vector<> to hold on blocks in struct blockvector In-Reply-To: <706dd0b5-a1f0-4cdb-bd41-b3b1a2bbac3a@simark.ca> (Simon Marchi's message of "Tue, 14 Oct 2025 15:29:42 -0400") References: <20251013182318.1045138-1-jan.vrany@labware.com> <20251013182318.1045138-3-jan.vrany@labware.com> <706dd0b5-a1f0-4cdb-bd41-b3b1a2bbac3a@simark.ca> X-Attribution: Tom Date: Tue, 14 Oct 2025 14:05:06 -0600 Message-ID: <87qzv5tfkd.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.110.68 X-Source-L: No X-Exim-ID: 1v8lGf-00000003rnl-2Zwl X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-110-68.hlrn.qwest.net (bapiya) [97.122.110.68]:58036 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfEqqd19TVB9qLDXnNSwGfVAThB1PXWMupB/sJow77vh5dmJAweS3TL0BUmjSgZhh3TVxMOXhFeILTjRqfpH9QMPfuWTrdLHYSZ8HIDgJt5EqPC1mQHQw dabh4h9yvr8Rz4zKBHGbfNxgA0PRER+yYMueAAGHxJ8Jd8IZ8dRIlDLdCpv7/n+X9hk/TPcHObOMv3WEbAEtwPLKSgiimMZX7dg= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Simon" == Simon Marchi writes: Simon> I also wish we could avoid having a "set_block" method, because it Simon> requires having the blockvector in an invalid state (some blocks slots Simon> set to nullptr) while we build it, which could be error prone. The Simon> users of the set_block method are buildsym and jit. From what i saw, Simon> they could both very well prepare an std::vector with their blocks and Simon> std::move that vector into a blockvector constructor. That constructor Simon> could assert that the blocks are correctly ordered, or to the sort Simon> itself (something that both buildsym and jit do already). buildsym Simon> starts with a singly-linked list (m_pending_blocks), moves the blocks to a Simon> temporary vector (in end_compunit_symtab_get_static_block), sorts that Simon> vector, builds a singly-linked list again, and then traverses that list Simon> to insert the blocks into the blockvector. I think that could all be Simon> simplified by making m_pending_blocks an std::vector from the Simon> start. Are you proposing that Jan do this in this patch? Or is this just a future-looking comment? It wasn't clear to me. Tom