From: "Hoyer, David" <David.Hoyer@netapp.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++ <libstdc++@gcc.gnu.org>
Subject: RE: printers.py issue
Date: Wed, 10 Mar 2021 16:57:49 +0000 [thread overview]
Message-ID: <DM5PR06MB280975DD7FF0C2E9130A797E92919@DM5PR06MB2809.namprd06.prod.outlook.com> (raw)
In-Reply-To: <20210304145728.GX3008@redhat.com>
I wanted to finally follow up on these issues I reported.
On issue 1, the patch you provided did fix the problem
On issue 2, I changed our python script to convert it to a string and it now works!
-----Original Message-----
From: Jonathan Wakely <jwakely@redhat.com>
Sent: Thursday, March 4, 2021 8:57 AM
To: Hoyer, David <David.Hoyer@netapp.com>
Cc: libstdc++ <libstdc++@gcc.gnu.org>
Subject: Re: printers.py issue
NetApp Security WARNING: This is an external email. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On 04/03/21 14:19 +0000, Hoyer, David via Libstdc++ wrote:
>Thank you for this feedback. We are certainly writing our own pretty-print functions which leverage the printers.py function. These worked fine with the jessie GCC and stretch GDB. I will continue to investigate from my end to see if we are doing something wrong (heaven forbid that be possible 😉)
I see. Then it might be possible that you're constructing a StdSetPrinter with a gdb.Type object as the "typename" argument. I when the libstdc++ printers are created they are always given a string for that argument.
For problem 1 (the typ.unqualified() issue) I've done some digging (see https://sourceware.org/bugzilla/show_bug.cgi?id=27510 for
details) and although I remain confused, I think typ.tag is what we want. We've already done strip_typedefs() so we should have a class type by that point, and .tag will be the unqualified class name.
I'll test this patch:
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -85,8 +85,8 @@ except ImportError:
def find_type(orig, name):
typ = orig.strip_typedefs()
while True:
- # Strip cv-qualifiers. PR 67440.
- search = '%s::%s' % (typ.unqualified(), name)
+ # Use Type.tag to ignore cv-qualifiers. PR 67440.
+ search = '%s::%s' % (typ.tag, name)
try:
return gdb.lookup_type(search)
except RuntimeError:
next prev parent reply other threads:[~2021-03-10 16:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <DM5PR06MB28097C4E645110031875A391929D9@DM5PR06MB2809.namprd06.prod.outlook.com>
2021-02-26 22:27 ` Jonathan Wakely
2021-02-26 22:31 ` Hoyer, David
2021-03-04 4:35 ` Hoyer, David
2021-03-04 11:47 ` Jonathan Wakely
2021-03-04 14:19 ` Hoyer, David
2021-03-04 14:57 ` Jonathan Wakely
2021-03-10 16:57 ` Hoyer, David [this message]
2021-03-11 17:56 ` Jonathan Wakely
2021-03-11 18:33 ` Hoyer, David
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=DM5PR06MB280975DD7FF0C2E9130A797E92919@DM5PR06MB2809.namprd06.prod.outlook.com \
--to=david.hoyer@netapp.com \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.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).