public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug symtab/30174] New: Rework 'main' name yet again
@ 2023-02-26 16:33 tromey at sourceware dot org
  2023-02-26 16:33 ` [Bug symtab/30174] " tromey at sourceware dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: tromey at sourceware dot org @ 2023-02-26 16:33 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30174
           Summary: Rework 'main' name yet again
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: symtab
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org
  Target Milestone: ---

The new DWARF indexer broke 'main' handling for some languages.
This was bug #30116.

However, I wonder if the fix for #30116 made startup a bit slower
for C and C++ programs.  The problem here is that the patch
removed the checks for a function named "main".  So, we can
no longer tell the language of "main" without a symbol lookup.
But -- this means waiting for finalization to be complete.

One solution would be to resurrect some old patches to make
the main-name stuff lazy.  Partly that involved something like:

#define current_language lazily_compute_language()

Another idea would be to have a "quick" function that does this
work.  Right now we have lookup_global_symbol_language, which
is used for this and only has a single caller -- it could easily
be made more specific.

The idea here would be to simply assume that if the objfile
has any C++ code at all, then use C++ as the language; otherwise
use C.  Perhaps like other languages the symbol could just
be searched for in minsyms.

-- 
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-09  1:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-26 16:33 [Bug symtab/30174] New: Rework 'main' name yet again tromey at sourceware dot org
2023-02-26 16:33 ` [Bug symtab/30174] " tromey at sourceware dot org
2023-02-26 16:34 ` tromey at sourceware dot org
2023-08-04 17:19 ` tromey at sourceware dot org
2023-08-05  8:56 ` vries at gcc dot gnu.org
2023-08-05 14:00 ` vries at gcc dot gnu.org
2023-08-06 15:03 ` tromey at sourceware dot org
2023-08-06 22:22 ` vries at gcc dot gnu.org
2023-10-24 19:40 ` tromey at sourceware dot org
2023-10-25  8:43 ` sam at gentoo dot org
2023-11-12 23:27 ` tromey at sourceware dot org
2024-01-09  1:46 ` cvs-commit at gcc dot gnu.org
2024-01-09  1:49 ` 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).