From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C5663385701A; Tue, 21 Jan 2025 14:23:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5663385701A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1737469386; bh=QyZIg72tZsDzmys/6zomoYQ9WdTjTkTBb3H4UNZHBMg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pK5O0QD4Mqc1nArLf1N5ui5zzl1oPkGWF3PPTm1XWjbwzqgngXlAQbvWG98UPiu4Q ctRQEHqWS+GEqn0yjoFFPhHDmXTvTlWRiSwDHJQCmYykafbxefPE4KozZVfXzOR8qn UnoLHkMVvwBUr1EWiap2tOI3TCcgD8n30KYQ3d5A= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/31897] [gdb/symtab] FAIL: gdb.base/fission-macro.exp: dwarf_version=5: dwarf_bits=32: strict_dwarf=0: info macro FIRST Date: Tue, 21 Jan 2025 14:23:06 +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=3D31897 --- Comment #3 from Sourceware Commits --- The master branch has been updated by Tom de Vries : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8935725a4471= 5b687908dc3daeee26597aa40dab commit 8935725a44715b687908dc3daeee26597aa40dab Author: Tom de Vries Date: Tue Jan 21 15:23:19 2025 +0100 [gdb/symtab] Fix gdb.base/fission-macro.exp with unix/-m32 When running test-case gdb.base/fission-macro.exp on openSUSE Tumbleweed (using gcc 14) with target board unix/-m32, I get: ... (gdb) info macro FIRST^M Defined at /data/vries/gdb/src/gdb/testsuite/gdb.base/fission-macro.c:0= ^M -DFIRST=3D1^M (gdb) FAIL: $exp: \ dwarf_version=3D5: dwarf_bits=3D32: strict_dwarf=3D0: info macro FIRST ... instead of the expected: ... (gdb) info macro FIRST^M Defined at /data/vries/gdb/src/gdb/testsuite/gdb.base/fission-macro.c:1= 8^M (gdb) PASS: $exp: \ dwarf_version=3D5: dwarf_bits=3D32: strict_dwarf=3D0: info macro FIRST ... A dwarf-5 .debug_str_offsets section starts with a header consisting of: - an initial length (4 bytes for 32-bit and 12 bytes for 64-bit), - a 2 byte version string, and - 2 bytes padding so in total 8 bytes for 32-bit and 16 bytes for 64-bit. This offset is calculated here in dwarf_decode_macros: ... str_offsets_base =3D cu->header.addr_size; ... which is wrong for both dwarf-5 cases (and also happens to be wrong for dwarf-4). Fix this by computing str_offsets_base correctly for dwarf-5, for both = the 32-bit and 64-bit case. Likewise, fix this for dwarf-4, using str_offsets_base 0. We can only = test this with gcc-15, because gcc 14 and earlier don't have the fix for PR debug/115066. Tested on x86_64-linux. Tested test-case using a current gcc trunk build, and gcc 14. Approved-By: Tom Tromey PR symtab/31897 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31897 --=20 You are receiving this mail because: You are on the CC list for the bug.=