From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46EAE384A01E; Thu, 16 Apr 2020 07:23:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46EAE384A01E From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/25833] New: [cc-with-gdb-index] FAIL: gdb.base/with.exp: basics: with language ada -- print g_s Date: Thu, 16 Apr 2020 07:23:18 +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: vries at gcc dot gnu.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 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, 16 Apr 2020 07:23:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25833 Bug ID: 25833 Summary: [cc-with-gdb-index] FAIL: gdb.base/with.exp: basics: with language ada -- print g_s Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: symtab Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- When running test-case with.exp with target board cc-with-gdb-index, we hav= e: ... (gdb) PASS: gdb.base/with.exp: basics: show language with language ada -- print g_s^M 'g_s' has unknown type; cast it to its declared type^M (gdb) FAIL: gdb.base/with.exp: basics: with language ada -- print g_s ... This scenario hits this case: ... static void dw2_map_matching_symbols (struct objfile *objfile, const lookup_name_info &name, domain_enum domain, int global, gdb::function_view callback, symbol_compare_ftype *ordered_compare) { /* Used for Ada. */ struct dwarf2_per_objfile *dwarf2_per_objfile =3D get_dwarf2_per_objfile (objfile); if (dwarf2_per_objfile->index_table !=3D nullptr) { /* Ada currently doesn't support .gdb_index (see PR24713). We can ge= t=20=20=20=20 here though if the current language is Ada for a non-Ada objfile= =20=20=20=20=20=20=20 using GNU index. As Ada does not look for non-Ada symbols this=20= =20=20=20=20=20=20=20 function should just return. */ return; } ... The reasoning for do nothing here is from a language perspective. But the problem is that it makes gdb behaviour inconsistent between: - having a .gdb_index section, and=20 - having a .gdb_names section, or a partial symtab, or -readnow. I think it's better to have consistent behaviour, and we should fix this. --=20 You are receiving this mail because: You are on the CC list for the bug.=