From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6F2B13858C36; Fri, 8 Dec 2023 17:22:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6F2B13858C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702056163; bh=FoNhQ5aPic1oTruw4cdZt6mF+vBB8K91STntLaRcS1I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xgRXgKe8PbMyPHbtGczxndiVxj9yRjtqQIIaZqQrk1nr9cy3AJ4NzwiPjd2FbTCc8 u9Wy/Hy1xWXp2exBzPyzlJiCkDmPBjRsYeZ6cy8vg46uABVfkCwcngfCwU20NBAeyI Mdtasxj8V8DElrRktmxE1huoPfpqphqEmLrdFaBs= From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug python/29079] Python pretty printer does not work for class members Date: Fri, 08 Dec 2023 17:22:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org 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: 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=3D29079 --- Comment #2 from Sourceware Commits --- The master branch has been updated by Hannes Domani : https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D7543c960b00d= dea23f6105eff4358ec214a7f93c commit 7543c960b00ddea23f6105eff4358ec214a7f93c Author: Hannes Domani Date: Fri Dec 8 18:19:42 2023 +0100 Use pretty printers for struct member stubs PR29079 shows that pretty printers can be used for an incomplete type (stub), but only when printing it directly, not if it's part of another struct: ``` (gdb) p s $1 =3D {pp m_i =3D 5} (gdb) p s2 $2 =3D {m_s =3D , m_l =3D 20} ``` The reason is simply that in common_val_print the check for stubs is before any pretty printer is tried. It works if the pretty printer is tried before the stub check: ``` (gdb) p s $1 =3D {pp m_i =3D 5} (gdb) p s2 $2 =3D {m_s =3D {pp m_i =3D 10}, m_l =3D 20} ``` Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29079 Approved-By: Tom Tromey --=20 You are receiving this mail because: You are on the CC list for the bug.=