From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2DB03382EA0B; Thu, 27 Oct 2022 00:58:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2DB03382EA0B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666832326; bh=M//7qW1APTcwH0lKnCGod8VGLkOK+t71LcCMCKPsSiw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nKpI/GldSc33E+rZucnc4Gm7VzY2dIi4bP8R2GMzWrAFMCKxsPmUpn0Fmj1Cb/92Y /b//ktQBqqyxLvo8/B5oxBk2dL8BbFECIJk0qZog66bLbJ4WIH9RfxMCM1c17ETvug XOs3W03IppmqH2TMl6nVMSEnBZ5vM1exNosHcgMc= From: "simark at simark dot ca" To: gdb-prs@sourceware.org Subject: [Bug macros/29725] Dwarf 5 C macros not handled Date: Thu, 27 Oct 2022 00:58:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: macros X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: simark at simark dot ca X-Bugzilla-Status: UNCONFIRMED 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: cc 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=3D29725 Simon Marchi changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simark at simark dot ca --- Comment #3 from Simon Marchi --- Thanks, I think I was able to reproduce. Your instructions should probably include CFLAGS=3D"-g3" though? So, I do this to reach the point in the code that you described: $ /home/simark/build/binutils-gdb/gdb/gdb --data-directory=3D/home/simark/build/binutils-gdb/gdb/data-directory -nx -q ./gawk -ex "b mk_binary" -ex "run -f test/divzero2.awk" -ex "advance 5539" (gdb) info macro memory The symbol `memory' has no definition as a C/C++ preprocessor macro at /home/simark/src/gawk/awkgram.c:-1 This -1 line number is fishy. Debugging gdb and breaking on macro_lookup_inclusion, and re-running "info macro memory", I can see that we do this: if (filename_cmp (name, source->filename) =3D=3D 0) return source;=20=20=20=20=20=20 Ref: https://gitlab.com/gnutools/binutils-gdb/-/blob/ecb58b32cdeb9789f9bc7c2037c= b001d9a729f83/gdb/macrotab.c#L511 (top-gdb) p name $1 =3D 0x621000136670 "/home/simark/src/gawk/awkgram.y" (top-gdb) p source->filename $2 =3D 0x621000136610 "/home/simark/src/gawk/awkgram.c" So, GDB is getting confused because of the different source filenames. Did this really work previously, using DWARF 4 and an older GDB? --=20 You are receiving this mail because: You are on the CC list for the bug.=