From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20918 invoked by alias); 10 Nov 2009 16:53:19 -0000 Received: (qmail 20903 invoked by uid 22791); 10 Nov 2009 16:53:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Nov 2009 16:53:14 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nAAGr8DU004466 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Nov 2009 11:53:08 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nAAGr7g0000764; Tue, 10 Nov 2009 11:53:08 -0500 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id nAAGr6Nu015636; Tue, 10 Nov 2009 11:53:07 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 55EA637815E; Tue, 10 Nov 2009 09:53:06 -0700 (MST) From: Tom Tromey To: Paul Pluzhnikov Cc: Paul Koning , "Elmenthaler\, Jens" , gdb@sourceware.org, archer@sourceware.org, dje@google.com Subject: Re: [python] Pretty-printers and addressprint References: <20091110021158.C3C2576D70@ppluzhnikov.mtv.corp.google.com> <58596C4646708B4BB990C44839973330013A61DE@usplmvpbe001.ent.rt.verigy.net> <8ac60eac0911100006yc31e2acmba7bf9fde33ddfa@mail.gmail.com> <8ac60eac0911100744t5335a44fn7175e2d5c512e450@mail.gmail.com> Reply-To: tromey@redhat.com Date: Tue, 10 Nov 2009 18:56:00 -0000 In-Reply-To: <8ac60eac0911100744t5335a44fn7175e2d5c512e450@mail.gmail.com> (Paul Pluzhnikov's message of "Tue, 10 Nov 2009 07:44:59 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00121.txt.bz2 >>>>> "Paul" == Paul Pluzhnikov writes: Paul> AFAICT, in GDB repr(value) is a no-op, and the end result of returning Paul> repr(value) from the pretty-printer is exactly the same as that of Paul> returning the value itself: That is because repr(value) ends up in valpy_str, which calls common_val_print. What you want instead is repr(value.string()), at least if you want to try this route. Tom