From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C615C385783B; Thu, 5 Aug 2021 10:56:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C615C385783B From: "vries at gcc dot gnu.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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: ada X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: tromey at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 10:56:55 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28180 --- Comment #4 from Tom de Vries --- 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 stru= ct 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 *typ= e, struct dwarf2 _cu *cu, sym =3D new (&objfile->objfile_obstack) symbol; OBJSTAT (objfile, n_syms++); + attr =3D dwarf2_attr (die, DW_AT_artificial, cu); + if (attr !=3D nullptr) + sym->artificial =3D 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 dif= fer 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 =3D nullptr; m_language =3D language_unknown; ada_mangled =3D 0; + artificial =3D 0; m_section =3D -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. --=20 You are receiving this mail because: You are on the CC list for the bug.=