This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH v3 3/3] Port libstdc++ pretty-printers to Python 2 + Python 3
- From: Samuel Bronson <naesten at gmail dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, GCC Patches <gcc-patches at gcc dot gnu dot org>, Jonathan Wakely <jwakely at redhat dot com>, GDB Patches <gdb-patches at sourceware dot org>, Matthias Klose <doko at ubuntu dot com>
- Date: Sat, 26 Jul 2014 00:44:40 -0400
- Subject: Re: [PATCH v3 3/3] Port libstdc++ pretty-printers to Python 2 + Python 3
- Authentication-results: sourceware.org; auth=none
- References: <1400701554-18062-1-git-send-email-naesten at gmail dot com> <1405046899-32639-1-git-send-email-naesten at gmail dot com> <1405046899-32639-4-git-send-email-naesten at gmail dot com> <8761j4imol dot fsf at naesten dot mooo dot com> <87tx6asm4y dot fsf at fleche dot redhat dot com>
Tom Tromey <firstname.lastname@example.org> writes:
>>>>>> "Samuel" == Samuel Bronson <email@example.com> writes:
> Samuel> +# FIXME: The handling of e.g. std::basic_string (at least on char)
> Samuel> +# probably needs updating to work with Python 3's new string rules.
> Samuel> +#
> Samuel> +# In particular, Python 3 has a separate type (called byte) for
> Samuel> +# bytestrings, and a special b"" syntax for the byte literals; the old
> Samuel> +# str() type has been redefined to always store Unicode text.
> Samuel> +#
> Samuel> +# We probably can't do much about this until GDB get their act
> Samuel> +# together: <https://sourceware.org/bugzilla/show_bug.cgi?id=17138>
> I don't think this comment is applicable.
> The libstdc++ pretty-printers use gdb.Value.lazy_string, not the
> built-in Python types.
Hmm, doesn't that just make it a timebomb -- a value that will explode
if, at some point in the future, someone tries to treat it as a string?
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!