From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6FB2A3858C00; Tue, 10 Oct 2023 08:26:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FB2A3858C00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1696926408; bh=sRwaETV8PQj6tgXzi5kEPg1p1J0g80acA32ls+87sX4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y+Esa/rXuCZI8UkNu4nS97MT+AuSr2H/1Vl3AuML+5wIjnsoZhSWfnuG/I6qwnA5n OO4smykkWas3VDgIO6djTM5xe+TAlRfAQzvDn5m78rJG2ZZVqBXqEWzZc9j+qkDtpq ACwI2sVJiOKS7q1iwIpIfO+K1K5kBI6WnTv8ZGrk= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored Date: Tue, 10 Oct 2023 08:26:45 +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: normal X-Bugzilla-Who: cvs-commit 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: 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=3D24549 --- Comment #9 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8b9c08eddac0= 38663b8f5ede4b4d24e441a6d8a3 commit 8b9c08eddac038663b8f5ede4b4d24e441a6d8a3 Author: Matheus Branco Borella Date: Tue Oct 10 10:26:40 2023 +0200 [gdb/symtab] Add name_of_main and language_of_main to the DWARF index This patch adds a new section to the DWARF index containing the name and the language of the main function symbol, gathered from `cooked_index::get_main`, if available. Currently, for lack of a better name, this section is called the "shortcut table". The way this name is both saved and applied upon an index being loaded in mirrors how it is done in `cooked_index_functions`, more specifically, the full name of the main function symbol is saved and `set_objfile_main_name` is used to apply it after i= t is loaded. The main use case for this patch is in improving startup times when dea= ling with large binaries. Currently, when an index is used, GDB has to expand sym= tabs until it finds out what the language of the main function symbol is. For some large executables, this may take a considerable amount of time to compl= ete, slowing down startup. This patch bypasses that operation by having both= the name and language of the main function symbol be provided ahead of time by t= he index. In my testing (a binary with about 1.8GB worth of DWARF data) this chan= ge brings startup time down from about 34 seconds to about 1.5 seconds. When testing the patch with target board cc-with-gdb-index, test-case gdb.fortran/nested-funcs-2.exp starts failing, but this is due to a pre-existing issue, filed as PR symtab/30946. Tested on x86_64-linux, with target board unix and cc-with-gdb-index. PR symtab/24549 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D24549 Approved-By: Tom de Vries --=20 You are receiving this mail because: You are on the CC list for the bug.=