From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C49F2385417E; Fri, 21 Oct 2022 16:13:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C49F2385417E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666368808; bh=jsbidVigUSnqa903Z/8DiMotg52UvsMf1ka1oMg7IBo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Z9ZR0xXSQwqk+RPziUJBKAi0Eo0GEZPL42sOowGanx+CoCG7y+K06ELUT3gCb9z8P 65a12No6c8jaHeIaDeJTnjeJqAl5dWm+UqiTuIh2jLj58mv/VZayA/qwSV1KbYTj4K Tdc62rseI4PJC/D3OXTJv6YQ+96oCB28b7WYreyE= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/29694] [gdb, gdb-index] FAIL: gdb.cp/stub-array-size.exp: print sizeof(a)/sizeof(a[0]) Date: Fri, 21 Oct 2022 16:13:27 +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: tromey at sourceware dot org X-Bugzilla-Target-Milestone: 13.1 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=3D29694 --- Comment #7 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Tom Tromey : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D2afd002ac6ac= b01763d643686345cc0c6ad564bd commit 2afd002ac6acb01763d643686345cc0c6ad564bd Author: Tom Tromey Date: Mon Oct 17 12:21:10 2022 -0600 Fix incorrect .gdb_index with new DWARF scanner PR symtab/29694 points out a regression caused by the new DWARF scanner when the cc-with-gdb-index target board is used. What happens here is that an older version of gdb will make an index describing the "A" type as: [737] A: 1 [global, type] whereas the new gdb says: [1008] A: 0 [global, type] Here the old one is correct because the A in CU 0 is just a declaration without a size: <1><45>: Abbrev Number: 10 (DW_TAG_structure_type) <46> DW_AT_name : A <48> DW_AT_declaration : 1 <48> DW_AT_sibling : <0x6d> This patch fixes the problem by introducing the idea of a "type declaration". I think gdb still needs to recurse into these types, searching for methods, but by marking the type itself as a declaration, gdb can skip this type during lookups and when writing the index. Regression tested on x86-64 using the cc-with-gdb-index board. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29694 --=20 You are receiving this mail because: You are on the CC list for the bug.=