From: Russell Mull <russell@digitalartificer.com>
To: gdb@sourceware.org
Subject: Regression or undocumented behavior change in Rust value printing in gdb 10.1
Date: Thu, 13 May 2021 17:07:58 -0700 [thread overview]
Message-ID: <CAJm2FJM7xYQW=JnWaL3a+rCPehtuXPjwjb1iZ5F=TC=rXc3QqQ@mail.gmail.com> (raw)
Hello,
I've been trying to track down an issue with Rust's pretty printing
extensions for gdb. They take effect when printing a value of one of the
supported special types directly, but they are not used if the value is a
member of a struct. For example, if I print a value of type "Vec<u8>", then
the pretty printers are used. However, if I print a value of type "struct
TrivialNewtype(Vec<u8>)", then they are not.
This behavior changed in gdb 10.1; in version 9.2 and earlier, the extended
pretty printer was invoked for struct members as expected. I've bisected
the commit history and found that the change occurred at commit
5f56f7cbd22219e84df3caece06f469c5063e5fb ("Convert Rust printing to
value-based API"). I can't easily piece together how this code is intended
to work in combination with python-based pretty printers like those
provided with Rust, so I thought I'd ask about it here.
Is this a bug, or possibly the new intended behavior? If it's the latter,
is there something that can be done on the python extension side to get the
old behavior back?
I'm tracking this on the Rust side at
https://github.com/rust-lang/rust/issues/85267, and have a small repro
available at https://github.com/mullr/gdb-pretty-test.
Thanks,
Russell Mull
next reply other threads:[~2021-05-14 0:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-14 0:07 Russell Mull [this message]
2021-05-14 13:52 ` Tom Tromey
2021-05-17 18:21 ` Tom Tromey
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='CAJm2FJM7xYQW=JnWaL3a+rCPehtuXPjwjb1iZ5F=TC=rXc3QqQ@mail.gmail.com' \
--to=russell@digitalartificer.com \
--cc=gdb@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).