public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
@ 2020-04-17  8:59 ` vries at gcc dot gnu.org
  2021-01-29 14:39 ` [Bug symtab/24549] " vries at gcc dot gnu.org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2020-04-17  8:59 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|DW_AT_main_subprogram       |[cc-with-gdb-index/cc-with-
                   |ignored with                |debug-names]
                   |cc-with-gdb-index/cc-with-d |DW_AT_main_subprogram
                   |ebug-names                  |ignored

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
  2020-04-17  8:59 ` [Bug gdb/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored vries at gcc dot gnu.org
@ 2021-01-29 14:39 ` vries at gcc dot gnu.org
  2021-02-05  9:56 ` cvs-commit at gcc dot gnu.org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2021-01-29 14:39 UTC (permalink / raw)
  To: gdb-prs

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|gdb                         |symtab

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
  2020-04-17  8:59 ` [Bug gdb/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored 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
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-05  9:56 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 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=a22ec6e8a4b9006e342ad20c36357a5ba8ba1e74

commit a22ec6e8a4b9006e342ad20c36357a5ba8ba1e74
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri Feb 5 10:56:39 2021 +0100

    [gdb/testsuite] Add KFAILs for PR symtab/24549

    When an executable contains an index such as a .gdb_index or .debug_names
    section, gdb ignores the DW_AT_subprogram attribute.

    This problem has been filed as PR symtab/24549.

    Add KFAILs for this PR in test-cases gdb.dwarf2/main-subprogram.exp and
    gdb.fortran/mixed-lang-stack.exp.

    Tested on x86_64-linux.

    gdb/testsuite/ChangeLog:

    2021-02-05  Tom de Vries  <tdevries@suse.de>

            * gdb.dwarf2/main-subprogram.exp: Add KFAIL for PR symtab/24549.
            * gdb.fortran/mixed-lang-stack.exp: Same.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2021-02-08 12:09 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Filed RFC to fix this in .debug_names:
https://sourceware.org/pipermail/gdb-patches/2021-February/175862.html

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (3 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2021-02-23 19:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
See also bug #13795.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (4 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2021-03-28 16:22 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #7 from Tom Tromey <tromey at sourceware dot org> ---
I think this is the current leading idea for a fix:

https://sourceware.org/pipermail/gdb-patches/2021-March/176709.html

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (5 preceding siblings ...)
  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
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: vries at gcc dot gnu.org @ 2023-09-13  7:15 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #8 from Tom de Vries <vries at gcc dot gnu.org> ---
gdb-index solution:
https://sourceware.org/pipermail/gdb-patches/2023-August/201568.html

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2023-09-13  7:15 ` vries at gcc dot gnu.org
@ 2023-10-10  8:26 ` cvs-commit at gcc dot gnu.org
  2023-12-10 15:21 ` tromey at sourceware dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-10-10  8:26 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2023-10-10  8:26 ` cvs-commit at gcc dot gnu.org
@ 2023-12-10 15:21 ` tromey at sourceware dot org
  2024-01-10  2:01 ` tromey at sourceware dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-12-10 15:21 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |24820
           Assignee|unassigned at sourceware dot org   |tromey at sourceware dot org

--- Comment #10 from Tom Tromey <tromey at sourceware dot org> ---
My .debug_names rewrite fixes this.


Referenced Bugs:

https://sourceware.org/bugzilla/show_bug.cgi?id=24820
[Bug 24820] .debug_names has incorrect contents
-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (8 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-01-10  2:01 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #11 from Tom Tromey <tromey at sourceware dot org> ---
https://sourceware.org/pipermail/gdb-patches/2023-December/204949.html

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (9 preceding siblings ...)
  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
  12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-18 20:38 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #12 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

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

commit 91a42a618085f236c5f6527322f88044e7550a63
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Dec 3 18:20:37 2023 -0700

    Rewrite .debug_names writer

    This rewrites GDB's .debug_names writer.  It is now closer to the form
    imagined in the DWARF spec.  In particular, names are emitted exactly
    as they appear in the original DWARF.

    In order to make the reader work nicely, some extensions were needed.
    These were all documented in an earlier patch.  Note that in
    particular this writer solves the "main name" problem by putting a
    flag into the table.

    GDB does not use the .debug_names hash table, so it also does not
    write one.  I consider this hash table to be essentially useless in
    general, due to the name canonicalization problem -- while DWARF says
    that writers should use the system demangling style, (1) this style
    varies across systems, so it can't truly be relied on; and (2) at
    least GCC and one other compiler don't actually follow this part of
    the spec anyway.

    It's important to note, though, that even if the hash was somehow
    useful, GDB probably still would not use it -- a sorted list of names
    is needed for completion and performs reasonably well for other
    lookups, so a hash table is just overhead, IMO.

    String emission is also simplified.  There's no need in this writer to
    ingest the contents of .debug_str.

    A couple of tests are updated to reflect the fact that they now "fail"
    because the tests don't include .debug_aranges in the .S file.
    Arguably the .debug_names writer should also create this section; but
    I did not implement that in this series, and there is a separate bug
    about it.

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

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (10 preceding siblings ...)
  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
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-01-18 20:38 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=24549
Bug 24549 depends on bug 24820, which changed state.

Bug 24820 Summary: .debug_names has incorrect contents
https://sourceware.org/bugzilla/show_bug.cgi?id=24820

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug symtab/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored
       [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2024-01-18 20:38 ` tromey at sourceware dot org
@ 2024-01-18 20:40 ` tromey at sourceware dot org
  12 siblings, 0 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2024-01-18 20:40 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |15.1
         Resolution|---                         |FIXED

--- Comment #13 from Tom Tromey <tromey at sourceware dot org> ---
Fixed in .debug_names as well now.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-01-18 20:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24549-4717@http.sourceware.org/bugzilla/>
2020-04-17  8:59 ` [Bug gdb/24549] [cc-with-gdb-index/cc-with-debug-names] DW_AT_main_subprogram ignored 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
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

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).