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 ada/28180] FAIL: gdb.ada/interface.exp: print s (timeout) Date: Thu, 05 Aug 2021 10:56:55 +0000 [thread overview] Message-ID: <bug-28180-4717-oBs7zGkmd6@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28180-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28180 --- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> --- This allows the test-case to pass: ... diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 6680a4fd657..e3bfcd8aa9f 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -3539,6 +3539,16 @@ ada_resolve_variable (struct symbol *sym, const struct block *block, candidates.end ()); } + candidates.erase + (std::remove_if + (candidates.begin (), + candidates.end (), + [] (block_symbol &bsym) + { + return bsym.symbol->artificial; + }), + candidates.end ()); + int i; if (candidates.empty ()) error (_("No definition found for %s"), sym->print_name ()); diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index acabee3315f..bff615d31ee 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -21592,6 +21592,10 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2 _cu *cu, sym = new (&objfile->objfile_obstack) symbol; OBJSTAT (objfile, n_syms++); + attr = dwarf2_attr (die, DW_AT_artificial, cu); + if (attr != nullptr) + sym->artificial = 1; + /* Cache this symbol's name and the name's demangled form (if any). */ sym->set_language (cu->per_cu->lang, &objfile->objfile_obstack); /* Fortran does not have mangling standard and the mangling does differ diff --git a/gdb/symtab.h b/gdb/symtab.h index fd8dd62a406..b028586e50f 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -536,6 +536,8 @@ struct general_symbol_info valid. */ unsigned int ada_mangled : 1; + unsigned int artificial : 1; + /* Which section is this symbol in? This is an index into section_offsets for this objfile. Negative means that the symbol does not get relocated relative to a section. */ @@ -1131,6 +1133,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstac k language_specific.obstack = nullptr; m_language = language_unknown; ada_mangled = 0; + artificial = 0; m_section = -1; /* GCC 4.8.5 (on CentOS 7) does not correctly compile class- initialization of unions, so we initialize it manually here. */ ... and passes gdb.ada/*.exp. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-08-05 10:56 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-02 22:32 [Bug ada/28180] New: " vries at gcc dot gnu.org 2021-08-02 22:32 ` [Bug ada/28180] " vries at gcc dot gnu.org 2021-08-02 22:36 ` vries at gcc dot gnu.org 2021-08-03 21:03 ` tromey at sourceware dot org 2021-08-04 20:06 ` tromey at sourceware dot org 2021-08-05 10:11 ` vries at gcc dot gnu.org 2021-08-05 10:56 ` vries at gcc dot gnu.org [this message] 2021-08-05 13:03 ` vries at gcc dot gnu.org 2021-08-05 13:17 ` vries at gcc dot gnu.org 2021-08-05 15:04 ` vries at gcc dot gnu.org 2021-08-06 16:16 ` tromey at sourceware dot org 2021-08-08 8:35 ` vries at gcc dot gnu.org 2021-08-13 18:42 ` tromey at sourceware dot org 2021-08-13 18:53 ` tromey at sourceware dot org 2021-08-14 13:13 ` vries at gcc dot gnu.org 2021-08-14 14:36 ` vries at gcc dot gnu.org 2021-08-17 18:05 ` brobecker at gnat dot com 2021-08-17 20:08 ` tromey at sourceware dot org 2021-08-24 11:14 ` vries at gcc dot gnu.org 2021-10-05 11:18 ` vries at gcc dot gnu.org 2024-03-08 9:55 ` sam at gentoo 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-28180-4717-oBs7zGkmd6@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).