From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9356 invoked by alias); 15 Jan 2010 19:56:04 -0000 Received: (qmail 9347 invoked by uid 22791); 15 Jan 2010 19:56:04 -0000 X-SWARE-Spam-Status: No, hits=-2.4 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; Fri, 15 Jan 2010 19:56:00 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0FJtxwk021833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 15 Jan 2010 14:55:59 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0FJtvkq005979 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 15 Jan 2010 14:55:59 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o0FJtuEr006906; Fri, 15 Jan 2010 20:55:56 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o0FJtupb006905; Fri, 15 Jan 2010 20:55:56 +0100 Date: Fri, 15 Jan 2010 19:56:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [patch 1/2] gdb-gdb.py: Make the fields copy-paste friendly Message-ID: <20100115195556.GA6844@host0.dyn.jankratochvil.net> References: <20100115192840.GB4324@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes 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 X-SW-Source: 2010-01/txt/msg00417.txt.bz2 On Fri, 15 Jan 2010 20:49:35 +0100, Tom Tromey wrote: > Maybe a new option like "set print type" or "set print pointer-type"? > Then it could apply everywhere, not just to the gdb-specific > pretty-printers. Such as even to non-Python struct printing which currently print: $1 = {pointer_type = 0x0, reference_type = 0x0, chain = 0x1dfaa40, instance_flags = 0, length = 36, main_type = 0x1dfaa70} > Jan> - fields.append("main_type = %s" % self.val['main_type']) > Jan> + fields.append("main_type = (%s) %s" % (self.val['main_type'].type, self.val['main_type'])) > > ... and in conjunction, changing this to just return values rather than > doing the formatting by hand. yes. Thanks, Jan