public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "tromey at sourceware dot org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug symtab/30174] New: Rework 'main' name yet again Date: Sun, 26 Feb 2023 16:33:03 +0000 [thread overview] Message-ID: <bug-30174-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2023-02-26 16:33 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-26 16:33 tromey at sourceware dot org [this message] 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
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-30174-4717@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: linkBe 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).