From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0CC943954C4F; Wed, 20 May 2020 09:48:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0CC943954C4F From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/25833] [cc-with-gdb-index] FAIL: gdb.base/with.exp: basics: with language ada -- print g_s Date: Wed, 20 May 2020 09:48:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: cvs-commit 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: 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: Wed, 20 May 2020 09:48:44 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25833 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D9a0bacfb08eb= 87938919023915ecc0ca2ba21223 commit 9a0bacfb08eb87938919023915ecc0ca2ba21223 Author: Tom de Vries Date: Wed May 20 11:48:39 2020 +0200 [gdb/symtab] Handle .gdb_index in ada language mode When running test-case gdb.base/with.exp with target board cc-with-gdb-index, we have: ... (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 is due to this bit in dw2_map_matching_symbols: ... if (dwarf2_per_objfile->index_table !=3D nullptr) { /* Ada currently doesn't support .gdb_index (see PR24713). We can get here though if the current language is Ada for a non-Ada objfi= le using GNU index. As Ada does not look for non-Ada symbols this function should just return. */ return; } ... While the reasoning in the comment may be sound from language perspecti= ve, it does introduce an inconsistency in gdb behaviour between: - having a .gdb_index section, and - having a .gdb_names section, or a partial symtab, or -readnow. Fix the inconsistency by completing implementation of dw2_map_matching_symbols. Tested on x86_64-linux, both with native and target board cc-with-debug-index. gdb/ChangeLog: 2020-05-20 Tom de Vries PR symtab/25833 * dwarf2/read.c (dw2_map_matching_symbols): Handle .gdb_index. gdb/testsuite/ChangeLog: 2020-05-20 Tom de Vries PR symtab/25833 * gdb.base/with-mf-inc.c: New test. * gdb.base/with-mf-main.c: New test. * gdb.base/with-mf.exp: New file. --=20 You are receiving this mail because: You are on the CC list for the bug.=