From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AC5D23858424; Wed, 26 Oct 2022 09:25:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC5D23858424 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666776320; bh=KjjDo9l8daqBht99Vw6DOMdG/WWqO+K9ks4lHKTDRew=; h=From:To:Subject:Date:From; b=nGj3th6JqQGfAd0vfywls2j6rtV9qM9iX9e7tL8pVaHzWqmaeRGruFeNqn14imOvY iZYxctnPs53xYfbKsWBnQyj7qpQJ3X+EiSHYigT9NvZi3MFIold6YgxDI0k86NgruR NA1zbZZcbiJpIAvIhlIEuhgnuBlYHxQBnoL+fweg= From: "drepper.fsp+rhbz at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/107414] New: dwarf 5 C macro support Date: Wed, 26 Oct 2022 09:25:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: drepper.fsp+rhbz at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107414 Bug ID: 107414 Summary: dwarf 5 C macro support Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug Assignee: unassigned at gcc dot gnu.org Reporter: drepper.fsp+rhbz at gmail dot com Target Milestone: --- Take this code: union node { struct { int a; } l; } x; #define memory l.a int main() { return x.memory; } When compiled with -gdwarf-4 -g3 and run in gdb, it is possible to use Breakpoint 1, main () at u.c:11 11 return x.memory; (gdb) p x.memory $1 =3D 0 When instead -gdwarf-5 -g3 is used 'memory' is not known to be a macro and = one gets Breakpoint 1, main () at u.c:11 11 return x.memory; (gdb) p x.memory There is no member named memory. Shouldn't the Dwarf 5 data be a superset of what Dwarf 4 provides? This is not new in the trunk/13 version. 12.1 fails as well and likely pri= or versions, too.=