From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1F2623858C60; Fri, 27 Jan 2023 20:41:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F2623858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1674852066; bh=RwjmfAPLwVo7QlNDzhT5aroUiqFd6EjHiN0JkJM1jqw=; h=From:To:Subject:Date:From; b=ShOvzQJMw6R6IXp98U+KoPngYiyZTrPhlhWvi0SNr/oGZmYqDf2CpSrPV4Yk7hREA 5GEKlhRnHiup2K5qr1DxCTZwmQEXQT58idn0S9j8UCo6Ih7yhmfngqSJqcfkQegGHZ 2KXd6BIvq/vYY4BufKNL+d8N/2QnUt9kNv48ChOM= From: "md5i at md5i dot com" To: gdb-prs@sourceware.org Subject: [Bug python/30057] New: Pretty printing doesn't seem to happen for static members Date: Fri, 27 Jan 2023 20:41:05 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 12.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: md5i at md5i 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 attachments.created 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=3D30057 Bug ID: 30057 Summary: Pretty printing doesn't seem to happen for static members Product: gdb Version: 12.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: md5i at md5i dot com Target Milestone: --- Created attachment 14635 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14635&action=3Ded= it test program For some reason, I'm having difficulty getting Python pretty printers to wo= rk properly on static members. For example: I compile the included program, foo.cpp: g++ -std=3Dc++20 -ggdb3 -o foo foo.cpp Then I set run gdb on the executable: gdb --quiet foo Here is the session without the pretty printer: Reading symbols from foo... (gdb) start Temporary breakpoint 1 at 0x112d: file foo.cpp, line 22. Starting program: /home/md5i/tmp/gdbtest/foo=20 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Temporary breakpoint 1, main () at foo.cpp:22 22 X x; (gdb) n 23 } (gdb) p x $1 =3D {a =3D {x =3D 0}, static b =3D {x =3D 1}, c =3D {x =3D 2},=20 static d =3D } (gdb) p x.b $2 =3D {x =3D 1} (gdb) p x.d $3 =3D {x =3D 3} Pretty much what you would expect, though what is that "" thi= ng? Then, loading the included python pretty printer: (gdb) source foo.py (gdb) p x $4 =3D {a =3D {Foo_A_B_C =3D 0}, static b =3D {x =3D 1}, c =3D {Foo_B_C_A= =3D 2},=20 static d =3D } (gdb) p x.b $5 =3D {Foo_A_B_C =3D 1} (gdb) p x.d $6 =3D {Foo_B_C_A =3D 3} As you can see, b as part of x does not use the pretty printer. And d has = the same "" problem as before. --=20 You are receiving this mail because: You are on the CC list for the bug.=