From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 77DE13858405; Thu, 21 Apr 2022 03:02:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77DE13858405 From: "asmwarrior at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug python/29079] Python pretty printer does not work for class members Date: Thu, 21 Apr 2022 03:02:49 +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: asmwarrior 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: 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2022 03:02:49 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29079 --- Comment #1 from asmwarrior --- ssbssa wrote a patch to fix this issue: Here is the patch: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff --git a/gdb/valprint.c b/gdb/valprint.c index 6b1531ef442..f540c681403 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1028,16 +1028,6 @@ common_val_print (struct value *value, struct ui_file *stream, int recurse, QUIT; - /* Ensure that the type is complete and not just a stub. If the type is - only a stub and we can't find and substitute its complete type, then - print appropriate string and return. */ - - if (real_type->is_stub ()) - { - fprintf_styled (stream, metadata_style.style (), _("")); - return; - } - if (!valprint_check_validity (stream, real_type, 0, value)) return; @@ -1048,6 +1038,16 @@ common_val_print (struct value *value, struct ui_file *stream, int recurse, return; } + /* Ensure that the type is complete and not just a stub. If the type is + only a stub and we can't find and substitute its complete type, then + print appropriate string and return. */ + + if (real_type->is_stub ()) + { + fprintf_styled (stream, metadata_style.style (), _("")); + return; + } + /* Handle summary mode. If the value is a scalar, print it; otherwise, print an ellipsis. */ if (options->summary && !val_print_scalar_type_p (type)) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D For more details, you can see the discussion here: Re: [solved] Creating a gdb Pretty-Printer for wxIPV4address =E2=80=94 https://forums.wxwidgets.org/viewtopic.php?p=3D211799#p211799 --=20 You are receiving this mail because: You are on the CC list for the bug.=