public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-31897-4717-i9FwKZECwU@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31897-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=31897 --- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8935725a44715b687908dc3daeee26597aa40dab commit 8935725a44715b687908dc3daeee26597aa40dab Author: Tom de Vries <tdevries@suse.de> 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=1^M (gdb) FAIL: $exp: \ dwarf_version=5: dwarf_bits=32: strict_dwarf=0: 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:18^M (gdb) PASS: $exp: \ dwarf_version=5: dwarf_bits=32: strict_dwarf=0: 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 = 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 <tom@tromey.com> PR symtab/31897 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31897 -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2025-01-21 14:23 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-15 8:34 [Bug symtab/31897] New: " vries at gcc dot gnu.org 2024-06-15 21:58 ` [Bug symtab/31897] " vries at gcc dot gnu.org 2025-01-21 10:20 ` vries at gcc dot gnu.org 2025-01-21 14:23 ` cvs-commit at gcc dot gnu.org [this message] 2025-01-21 14:24 ` vries at gcc dot gnu.org 2025-03-09 0:10 ` tromey at sourceware dot org 2025-03-09 0:14 ` sam at gentoo dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-31897-4717-i9FwKZECwU@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).