From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22540 invoked by alias); 26 Jul 2014 04:44:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22504 invoked by uid 89); 26 Jul 2014 04:44:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 26 Jul 2014 04:44:48 +0000 Received: by mail-qg0-f52.google.com with SMTP id f51so5924814qge.25 for ; Fri, 25 Jul 2014 21:44:46 -0700 (PDT) X-Received: by 10.140.106.74 with SMTP id d68mr33121902qgf.103.1406349886806; Fri, 25 Jul 2014 21:44:46 -0700 (PDT) Received: from hydrogen (naesten-pt.tunnel.tserv4.nyc4.ipv6.he.net. [2001:470:1f06:57::2]) by mx.google.com with ESMTPSA id d69sm13696122qge.35.2014.07.25.21.44.44 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jul 2014 21:44:45 -0700 (PDT) Received: from naesten by hydrogen with local (Exim 4.82) (envelope-from ) id 1XAtqb-0006nM-GV; Sat, 26 Jul 2014 00:44:42 -0400 From: Samuel Bronson To: Tom Tromey Cc: libstdc++@gcc.gnu.org, GCC Patches , Jonathan Wakely , GDB Patches , Matthias Klose Subject: Re: [PATCH v3 3/3] Port libstdc++ pretty-printers to Python 2 + Python 3 References: <1400701554-18062-1-git-send-email-naesten@gmail.com> <1405046899-32639-1-git-send-email-naesten@gmail.com> <1405046899-32639-4-git-send-email-naesten@gmail.com> <8761j4imol.fsf@naesten.mooo.com> <87tx6asm4y.fsf@fleche.redhat.com> Date: Sun, 27 Jul 2014 04:22:00 -0000 In-Reply-To: <87tx6asm4y.fsf@fleche.redhat.com> (Tom Tromey's message of "Mon, 21 Jul 2014 10:38:05 -0600") Message-ID: <87k370685j.fsf@naesten.mooo.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00684.txt.bz2 Tom Tromey writes: >>>>>> "Samuel" == Samuel Bronson 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: > > 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!