public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom Tromey <tromey@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix bug in cooked index scanner Date: Sun, 28 Jan 2024 23:43:09 +0000 (GMT) [thread overview] Message-ID: <20240128234309.20C053858C2D@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=48f7f3751eac0bb5a2cf8c4d52cbf477e81bef14 commit 48f7f3751eac0bb5a2cf8c4d52cbf477e81bef14 Author: Tom Tromey <tom@tromey.com> Date: Thu Mar 30 10:21:59 2023 -0600 Fix bug in cooked index scanner Testing this entire series pointed out that the cooked index scanner disagrees with new_symbol about certain symbols. In particular, new_symbol has this comment: Ada and Fortran subprograms, whether marked external or not, are always stored as a global symbol, because we want This patch updates the scanner to match. I don't know why the current code does not cause failures. It's maybe worth noting that incremental CU expansion -- creating symtabs directly from the index -- would eliminate this sort of bug. Diff: --- gdb/dwarf2/read.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 925a5ea4a5b..55a17358e66 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -16326,6 +16326,12 @@ cooked_indexer::scan_attributes (dwarf2_per_cu_data *scanning_per_cu, || abbrev->tag == DW_TAG_enumeration_type || abbrev->tag == DW_TAG_enumerator)) *flags &= ~IS_STATIC; + + /* Keep in sync with new_symbol. */ + if (abbrev->tag == DW_TAG_subprogram + && (m_language == language_ada + || m_language == language_fortran)) + *flags &= ~IS_STATIC; } return info_ptr;
reply other threads:[~2024-01-28 23:43 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240128234309.20C053858C2D@sourceware.org \ --to=tromey@sourceware.org \ --cc=gdb-cvs@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).