This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] 12266 Fallout
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 26 Aug 2011 12:05:10 -0600
- Subject: Re: [RFC] 12266 Fallout
- References: <4E56D4A3.7000306@redhat.com>
Keith> I am writing for some maintainer guidance on an issue that has arisen.
Keith> 1) Add DMGL_VERBOSE where it is needed so that NO typedefs ever appear
Keith> in a (non-TYPE_CODE_TYPEDEF) symbol's name
Keith> 2) Add a new version of check_typedef which "stops" at std::string
Keith> (and std::ostream, std::istream, std::iostream), and add logic
Keith> (somewhere) to deal with going from "std::basic_string<...>" back to
Keith> "std::string" (and likewise for the others).
Keith> Actually in this case, the "right" output would be "calltest(foo)",
Keith> but that is a different, but related, problem, for which I developed a
Keith> patch a long time ago, part of the first 12266 patch submissions
Keith> (dwarf2_print_name).
Let's call this option #3.
Keith> - Shall I continue #1 and start submitting patches?
Keith> - Shall I start teaching gdb about std::string et al and how to deal
Keith> with them in the environment we have today?
Keith> - Have I missed something that would be preferable to anything I've
Keith> mentioned?
I don't understand why check_typedef would necessarily be involved.
If we changed the canonicalizer to respect this ABI rule about std::
names, then wouldn't std::string be the type's actual name?
And so we wouldn't have to change check_typedef?
In any case, isn't #3 the best approach? That is, separating the search
key from the print name, and making the print name closer to what users
expect. I think we should always be considering what end state we want
to be in, and this seems to be it.
If you are looking for a quick fix, but plan to do #3, then #1 is fine
by me.
Tom