public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-29079-4717-g7mmBACIzY@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29079-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29079

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Hannes Domani <ssbssa@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7543c960b00ddea23f6105eff4358ec214a7f93c

commit 7543c960b00ddea23f6105eff4358ec214a7f93c
Author: Hannes Domani <ssbssa@yahoo.de>
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 = {pp m_i = 5}
    (gdb) p s2
    $2 = {m_s = <incomplete type>, m_l = 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 = {pp m_i = 5}
    (gdb) p s2
    $2 = {m_s = {pp m_i = 10}, m_l = 20}
    ```

    Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29079
    Approved-By: Tom Tromey <tom@tromey.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-12-08 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20 23:24 [Bug python/29079] New: " asmwarrior at gmail dot com
2022-04-21  3:02 ` [Bug python/29079] " asmwarrior at gmail dot com
2023-12-08 17:22 ` cvs-commit at gcc dot gnu.org [this message]
2023-12-08 17:23 ` ssbssa at sourceware dot org
2023-12-09  9:03 ` asmwarrior at gmail dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29079-4717-g7mmBACIzY@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).