From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11399 invoked by alias); 3 Jun 2008 13:04:35 -0000 Received: (qmail 11390 invoked by uid 22791); 3 Jun 2008 13:04:35 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 03 Jun 2008 13:04:15 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 54632983F8 for ; Tue, 3 Jun 2008 13:04:13 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 36BD298371 for ; Tue, 3 Jun 2008 13:04:13 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1K3WBQ-0002Dg-KL for gdb-patches@sourceware.org; Tue, 03 Jun 2008 09:04:12 -0400 Date: Tue, 03 Jun 2008 13:04:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: [RFC][patch 2/9] export values mechanism to Python Message-ID: <20080603130412.GB7866@caradoc.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <20080429155212.444237503@br.ibm.com> <20080429155304.466637516@br.ibm.com> <20080528212451.GB2969@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) 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: 2008-06/txt/msg00016.txt.bz2 On Mon, Jun 02, 2008 at 06:18:59PM -0600, Tom Tromey wrote: > >>>>> "Daniel" == Daniel Jacobowitz writes: > > Daniel> Would it be helpful or confusing to automatically expose this > Daniel> as [] in Python, __getitem__? > > Good question. > > In general I've been using explicit method names, like get_* and > set_*. But perhaps we should be using attributes and various > "intrinsic" names... I'm not enough of a Python expert to know what is > preferred. Anyone else got a preference? > Also, about the varobj patch in particular: I notice that it is > MI-specific. At least for type visualizers I think I would like > something that works with 'print' as well. I'm thinking: > > * A way to register a type->object mapping from Python I'm not sure what you mean. Type to what object? An interesting question is how to access sub-pieces of a value from the CLI. If we pretty-print something as a map, how should the user get (A) the values, and (B) the fields of the raw representation of the map? I think we need a UI before we worry about the innards. -- Daniel Jacobowitz CodeSourcery