From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 15340385783C; Wed, 26 Oct 2022 09:59:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15340385783C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666778345; bh=GDvNsilLf7kQixCFG836K6khh64jde8OiaX71tEYZuM=; h=From:To:Subject:Date:From; b=FCC0N5KTN9EtYGrr8DjdLfwy4POl1MsuFV8ug3uFuN6qI1tbh4bWJoEtS8BjDmCIP Rd3DpX5Pj74zDc3jLSfvJqUt87MqCT+XBcULAfxC+qRA3AJrxnHOMjvbF+3EZ/vG4E JhKv9Jh5ZT8x/Jx4MuR8/GgMWe5TJMi1/69msFsc= From: "drepper.fsp at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug macros/29725] New: Dwarf 5 C macros not handled Date: Wed, 26 Oct 2022 09:59:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: drepper.fsp at gmail dot com 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: 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://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29725 Bug ID: 29725 Summary: Dwarf 5 C macros not handled Product: gdb Version: 12.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: macros Assignee: unassigned at sourceware dot org Reporter: drepper.fsp at gmail dot com Target Milestone: --- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107414 for the gcc maintainer's analysis. Jakub thinks this is a gdb issue. Copied from the gcc bug: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~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. --=20 You are receiving this mail because: You are on the CC list for the bug.=