From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CC793858D20; Sun, 26 Feb 2023 16:33:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CC793858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677429184; bh=MpL2RS0Y8KzSRu6R6tY7s2c+11IJlzY/OuehI93eYXM=; h=From:To:Subject:Date:From; b=rVZbRssAauEm6suZhdOXg2okrRx41XQ89FxP9w/Fe3tinE5v57AsssWtSQScZQaB0 a2yIMg1AzWpnIJ5DBEkrQrRi/mRmkz0QsvrQUXW2SoPa1vrFfOAjRxTrz8Ga/ypIxy bGrab4VTBAlKf+gO3OiENXR8hg8BiLKBogefqM+k= From: "tromey at sourceware dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: tromey at sourceware dot 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D30174 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. --=20 You are receiving this mail because: You are on the CC list for the bug.=