From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 42C3D3858428; Sun, 24 Jul 2022 08:25:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 42C3D3858428 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29398] New: [gdb/symtab] lazy CU expansion Date: Sun, 24 Jul 2022 08:25:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: vries at gcc dot gnu.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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2022 08:25:40 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29398 Bug ID: 29398 Summary: [gdb/symtab] lazy CU expansion Product: gdb Version: HEAD Status: NEW Severity: enhancement Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- >>From PR29391 comment 1: ... The second problem is that CU expansion can be slow. Here I think gdb could do a lot better, the basic idea being lazy CU expansion. In response to a CU expansion request, the DWARF reader would create the symtab / compunit_symtab structures and it would also create some "outline" struct symbols -- one for each cooked_index_entry. Then when some attribute of a symbol is needed (say, the type), the DWARF reader would read the rest of the symbol that that moment. The major advantage of this approach is that most data in a CU is not needed at all. So, much less work would need to be done in general. I think it would be possible to avoid reading every DIE. A secondary advantage is that, because the symbols are created directly from the cooked index, we would avoid the situation where the two readers could diverge. That would no longer be possible at all. There are some downsides. It's more complex, and it is complicated to implement and test. Also I think it would require fixing the .debug_names bug, and also probably removing .gdb_index support. Finally, we'd have to change the blockvector to be expandable. ... --=20 You are receiving this mail because: You are on the CC list for the bug.=