From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DF6923858425; Wed, 21 Dec 2022 19:55:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DF6923858425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671652524; bh=rawg5p2/cCHA7saJRy6EW1h3Dr+8KnPYxzEZJde69uY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DW5Ki9iqrWd9egFFnjMEH1IA1I57NT41F2ejlY1H2qoyw+yAhnqlfTDFlLcmw+QYp h7sOCk5GotqSLPU1SWFv9Fxa8tLrLA3kyscwYS5zvX0m1I03R0+npu9dRy/2H2VI82 ilOdGL4cWn7ScwMzBuihhrSM2G7AhCdRhlhEdPx4= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29398] [gdb/symtab] lazy CU expansion Date: Wed, 21 Dec 2022 19:55:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: tromey at sourceware dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29398 --- Comment #5 from Tom Tromey --- This came up a little on the list: https://sourceware.org/pipermail/gdb-patches/2022-December/194993.html so I thought I'd write up my tentative notes/plan. The basic idea is that the cooked index can be used to directly construct the symtab. The names can easily be computed, and some (but not all) of each symbol's contents can be filled in. Then, we'd set a flag on the symbol and have the various accessor methods in 'symbol' call the DWARF reader to fill in the details. Ideally the DWARF reader would do the minimum possible to satisfy the request. This would require making the blockvector expandable, if function bodies are read lazily. Types could be read lazily by hooking into check_typedef. It would also be good to avoid reading every DIE in the CU. Really excellent might be to do what the indexer does, and simply not read DIEs at all -- just walk attributes and process them. However, this would require a substantial rewrite. If just the DIEs rooted at the offset mentioned in the cooked entry are read, it seems straightforward enough to read other DIEs on demand. --=20 You are receiving this mail because: You are on the CC list for the bug.=