From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22141 invoked by alias); 10 Nov 2009 15:45:19 -0000 Received: (qmail 22071 invoked by uid 22791); 10 Nov 2009 15:45:16 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Nov 2009 15:45:13 +0000 Received: from spaceape14.eur.corp.google.com (spaceape14.eur.corp.google.com [172.28.16.148]) by smtp-out.google.com with ESMTP id nAAFjAPv023965; Tue, 10 Nov 2009 15:45:10 GMT Received: from pxi33 (pxi33.prod.google.com [10.243.27.33]) by spaceape14.eur.corp.google.com with ESMTP id nAAFix14003007; Tue, 10 Nov 2009 07:45:00 -0800 Received: by pxi33 with SMTP id 33so10166pxi.4 for ; Tue, 10 Nov 2009 07:44:59 -0800 (PST) MIME-Version: 1.0 Received: by 10.114.163.26 with SMTP id l26mr377485wae.173.1257867899106; Tue, 10 Nov 2009 07:44:59 -0800 (PST) In-Reply-To: References: <20091110021158.C3C2576D70@ppluzhnikov.mtv.corp.google.com> <58596C4646708B4BB990C44839973330013A61DE@usplmvpbe001.ent.rt.verigy.net> <8ac60eac0911100006yc31e2acmba7bf9fde33ddfa@mail.gmail.com> Date: Tue, 10 Nov 2009 17:03:00 -0000 Message-ID: <8ac60eac0911100744t5335a44fn7175e2d5c512e450@mail.gmail.com> Subject: Re: [python] Pretty-printers and addressprint From: Paul Pluzhnikov To: Paul Koning Cc: "Elmenthaler, Jens" , gdb@sourceware.org, archer@sourceware.org, dje@google.com Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00119.txt.bz2 On Tue, Nov 10, 2009 at 3:53 AM, Paul Koning wrote: >> Unfortunately I frequently deal with non-ascii strings, and the >> problem just wouldn't go away :-( > > My test (without gdb, I don't have that installed yet) is inconclusive > but I think using repr() will cure that too. AFAICT, in GDB repr(value) is a no-op, and the end result of returning repr(value) from the pretty-printer is exactly the same as that of returning the value itself: $4 = 0x4007e0 "this is x\201\202\203\204" Should repr(value) do something different? Thanks, -- Paul Pluzhnikov