public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug symtab/30661] [gdb/symtab] main symbol language lookup causes symtab expansion
Date: Fri, 21 Jul 2023 09:53:56 +0000 [thread overview]
Message-ID: <bug-30661-4717-UYAmuUg5Qu@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-30661-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=30661
--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #2)
> Using this:
> ...
> diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
> index 25635d9b72e..0b2d35f4b86 100644
> --- a/gdb/dwarf2/cooked-index.c
> +++ b/gdb/dwarf2/cooked-index.c
> @@ -62,7 +62,7 @@ bool
> language_requires_canonicalization (enum language lang)
> {
> return (lang == language_ada
> - || lang == language_c
> + || lang == language_d
> || lang == language_cplus);
> }
>
> @@ -242,6 +242,10 @@ cooked_index_shard::add (sect_offset die_offset, enum
> dwarf_tag tag,
> implicit "main" discovery. */
> if ((flags & IS_MAIN) != 0)
> m_main = result;
> + else if (!language_requires_canonicalization (per_cu->lang ())
> + && m_main == nullptr
> + && strcmp (name, "main") == 0)
> + m_main = result;
>
> return result;
> }
> ...
> we get the old behaviour back, without regressing on
> gdb.dlang/dlang-start-2.exp (can't run gdb.dlang/dlang-start.exp).
Hmm, on the other hand I also want this to work for c++, so I guess a different
fix is needed.
Anyway, FWIW, tested on top of trunk on x86_64-linux, no regressions.
Also, I found the source of the requirement to mark C as a language that
requires canonicalization: c_canonicalize_name.
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2023-07-21 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 7:34 [Bug symtab/30661] New: " vries at gcc dot gnu.org
2023-07-21 8:16 ` [Bug symtab/30661] " vries at gcc dot gnu.org
2023-07-21 9:02 ` vries at gcc dot gnu.org
2023-07-21 9:53 ` vries at gcc dot gnu.org [this message]
2023-07-21 14:12 ` vries at gcc dot gnu.org
2023-07-31 14:16 ` vries at gcc dot gnu.org
2023-08-04 11:24 ` vries at gcc dot gnu.org
2023-08-05 15:57 ` cvs-commit at gcc dot gnu.org
2023-08-05 16:01 ` vries at gcc dot gnu.org
2023-10-30 16:14 ` josh.cottingham at linaro 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-30661-4717-UYAmuUg5Qu@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).