From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 95C583858D20; Thu, 7 Sep 2023 19:59:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 95C583858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1694116781; bh=lGJiyEUAXdDLE3pRe5xvwXfqq9wPywgJa+ifbiE6QsI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V1ah/5unMeMGMPItuQNXuvawyRIuWAq3xJ4dgAwMrOuGo78VX/QoPazYfCCitPlHq oDCy0IRA4jd+PmG0kdztLS15Nzz+3OAimfY3XAJZ0IJ1tblx9swx8Ia9hf3K3OvRsp Uoz2D5oeK9VC3+LPuFqvoBq9kr+TwoIGl2SdaASE= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/30827] [gdb/symtab, dwarf4-gdb-index] FAIL: gdb.ada/same_enum.exp: print red Date: Thu, 07 Sep 2023 19:59:41 +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 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30827 --- Comment #4 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=3Dbe7d5d2c417a= 842452f5f5d4ed7fc8d058a970bf commit be7d5d2c417a842452f5f5d4ed7fc8d058a970bf Author: Tom de Vries Date: Thu Sep 7 21:59:33 2023 +0200 [gdb/symtab] Fix gdb-index writing for .debug_types With test-case gdb.ada/same_enum.exp and target board dwarf4-gdb-index = we run into: ... (gdb) print red^M No definition of "red" in current context.^M (gdb) FAIL: gdb.ada/same_enum.exp: print red ... [ This is a regression since commit 844a72efbce ("Simplify gdb_index writing"), so this is broken in gdb 12 and 13. ] The easiest way to see what's going wrong is with readelf. We have in section .gdb_index: ... [7194] pck__red: 2 [static, variable] 3 [static, variable] ... which points to the CUs 2 and 3 in the CU list (shown using "2" and "3"= ), but should be pointing to the TUs 2 and 3 in the TU list (shown using "T2" = and "T3"). Fix this by removing the counter / types_counter distinction in write_gdbindex, such that we get the expected: ... [7194] pck__red: T2 [static, variable] T3 [static, variable] ... [ While reading write_gdbindex I noticed a few oddities related to dwz handling, I've filed PR30829 about this. ] Tested on x86_64-linux. Approved-By: Tom Tromey PR symtab/30827 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30827 --=20 You are receiving this mail because: You are on the CC list for the bug.=