From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MuDlJl+oE2m5ZjcAWB0awg (envelope-from ) for ; Tue, 11 Nov 2025 16:19:27 -0500 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=qzA1lzEd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8F74E1E04C; Tue, 11 Nov 2025 16:19:27 -0500 (EST) 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 F11821E04C for ; Tue, 11 Nov 2025 16:19:26 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 752563858C40 for ; Tue, 11 Nov 2025 21:19:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 752563858C40 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=qzA1lzEd Received: from omta038.useast.a.cloudfilter.net (omta038.useast.a.cloudfilter.net [44.202.169.37]) by sourceware.org (Postfix) with ESMTPS id 6A4463858D20 for ; Tue, 11 Nov 2025 21:18:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6A4463858D20 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 6A4463858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762895910; cv=none; b=UcJ/V7K8jlgVCYCmbohfdfi3Xw2XEs1d+tJOLKhw/hnhhODzpDoPsLX4LNHWmRWSm3hdOsPa2eVA3aPGoH8U4ZHoi4FNtaJrM3z8ZzW063jGY4yNF9NNa+VLLmXcZ+Zn14MazOmiTpcxhop7UQZ0/jqOuTg+hVhjnl6gnxKjnic= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762895910; c=relaxed/simple; bh=Hx+hFEDBwoj+5lJqCVNE4I0QHz1zW7K7SXbcEANlov0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=jys3ySVX+pyUx1J97Wsumk1udo6q73y3GKDrWnFTh1n0c2MU1vMGRrRxQsgvwxRl8WAEtTSYvnRtavaBGi/bY+BmaOWmhuJxAfqZ/SU4zLFJf4BvM46kn3+tsPfzdxcI8zNktW+r4dEV83aIkVkB6Yhi0ZPlGA6wGXCRy81ZU7Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6A4463858D20 Received: from eig-obgw-5001b.ext.cloudfilter.net ([10.0.29.181]) by cmsmtp with ESMTPS id Ist0vZZgQSkcfIvkzvCg72; Tue, 11 Nov 2025 21:18:29 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id Ivkzv3Sk1HjyIIvkzvZ5us; Tue, 11 Nov 2025 21:18:29 +0000 X-Authority-Analysis: v=2.4 cv=Ys4PR5YX c=1 sm=1 tr=0 ts=6913a825 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=ItBw4LHWJt0A:10 a=CCpqsmhAAAAA:8 a=8NhlGNS0eLO8ibq_o_0A:9 a=QEXdDO2ut3YA:10 a=ul9cdbp4aOFLsgKbc677:22 a=VS4QxaUSPT0UtbFnIvSC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: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=FkCGu32CZswYKFt1+pWaZ6epV3YhO3N8Km0XxsG7+N0=; b=qzA1lzEd9674ybta2RvXAMpX2U FXw8A8jJPjhtDc084jMo6HU0Y43GB37ycMv8/IReAKyyjJlX9eaVtdAZJ+83K5ivfvIfiOcCbwPjC j0w92hI5vNXyR/i4TAFJKG09I; Received: from 97-122-120-205.hlrn.qwest.net ([97.122.120.205]:41732 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vIvky-000000036dC-3TnO; Tue, 11 Nov 2025 14:18:28 -0700 From: Tom Tromey To: Jan Vrany via Gdb Cc: Jan Vrany Subject: Re: Internals of -readnow implementation In-Reply-To: (Jan Vrany via Gdb's message of "Tue, 11 Nov 2025 16:18:05 +0000") References: X-Attribution: Tom Date: Tue, 11 Nov 2025 14:18:27 -0700 Message-ID: <87ms4sxo7w.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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.120.205 X-Source-L: No X-Exim-ID: 1vIvky-000000036dC-3TnO X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-120-205.hlrn.qwest.net (bapiya) [97.122.120.205]:41732 X-Source-Auth: tom+tromey.com X-Email-Count: 1 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfHGUtioj1IweuHe5KpcejgqwglI3XSsR4L8cLN7YLHzd9baYIOWNA03wkb1Noy9nrRqtHbl0ri6IbWs6NBo65cft6QVucKVO4ml0yRewsGg/LPeaYetd 0MHhKl3A3nSEccYbL7i5Y6/fv5jTOaZ45SuK2mIkL0jcWZFH1RW+QeGJednLWbq9p6draPYBZv7NfQ== X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-bounces~public-inbox=simark.ca@sourceware.org Sender: "Gdb" Jan> looking at how -readnow is implemented, I'm puzzled Jan> why implementation of readnow_functions inherits/user Jan> dwarf2_base_index_functions? It's mostly a convenience, because that class implements some methods. Jan> My understanding is that if -readnow is specified, then Jan> all compunit symbtabs in that objfile are fully read. Jan> It seems to me that in theory one can implement it "directly"=C2=A0 Jan> by traversing compunit symtabs, its blockvector and symbols=C2=A0 Jan> (rather=C2=A0than using dwarf2_per_objfile and alike).=C2=A0 Jan> Is that because it was just easier to implement it this way Jan> or is there a reason why it has to go through DWARF reader Jan> structures? There's no deep reason. For this bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D33554 ... I am planning to reimplement it as you say: just search things directly without regard to the DWARF data structures. -readnow is weird because it's mostly there as a debugging aid, and sometimes a workaround for other bugs. While I have recommended it to users, I don't really like doing so. Occasionally I think about removing it. Tom