public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-24549-4717-maFyC6QW1B@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-24549-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=24549

--- Comment #9 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom de Vries <vries@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8b9c08eddac038663b8f5ede4b4d24e441a6d8a3

commit 8b9c08eddac038663b8f5ede4b4d24e441a6d8a3
Author: Matheus Branco Borella <dark.ryu.550@gmail.com>
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 it is
    loaded.

    The main use case for this patch is in improving startup times when dealing
with
    large binaries. Currently, when an index is used, GDB has to expand symtabs
    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 complete,
    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 the
index.

    In my testing (a binary with about 1.8GB worth of DWARF data) this change
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=24549

    Approved-By: Tom de Vries <tdevries@suse.de>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-10-10  8:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
2020-04-17  8:59 ` [Bug gdb/24549] " vries at gcc dot gnu.org
2021-01-29 14:39 ` [Bug symtab/24549] " vries at gcc dot gnu.org
2021-02-05  9:56 ` cvs-commit at gcc dot gnu.org
2021-02-08 12:09 ` vries at gcc dot gnu.org
2021-02-23 19:01 ` tromey at sourceware dot org
2021-03-28 16:22 ` tromey at sourceware dot org
2023-09-13  7:15 ` vries at gcc dot gnu.org
2023-10-10  8:26 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-10 15:21 ` tromey at sourceware dot org
2024-01-10  2:01 ` tromey at sourceware dot org
2024-01-18 20:38 ` cvs-commit at gcc dot gnu.org
2024-01-18 20:38 ` tromey at sourceware dot org
2024-01-18 20:40 ` tromey at sourceware dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-24549-4717-maFyC6QW1B@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).