From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32729 invoked by alias); 25 Mar 2008 21:28:39 -0000 Received: (qmail 32720 invoked by uid 22791); 25 Mar 2008 21:28:38 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Mar 2008 21:28:21 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m2PLSExY028558; Tue, 25 Mar 2008 17:28:14 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2PLSEDS002958; Tue, 25 Mar 2008 17:28:14 -0400 Received: from opsy.redhat.com (vpn-14-254.rdu.redhat.com [10.11.14.254]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2PLSD0v022802; Tue, 25 Mar 2008 17:28:14 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id F15B43780C2; Tue, 25 Mar 2008 14:32:33 -0600 (MDT) To: Paul Koning Cc: jimb@red-bean.com, bauerman@br.ibm.com, gdb@sourceware.org Subject: Re: repo to work on python scripting support References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> <20080325114520.GA21688@caradoc.them.org> <8f2776cb0803251118o316d261erb340d67bb0580967@mail.gmail.com> <18409.18988.613477.542099@pkoning-laptop.equallogic.com> <18409.21257.48822.645806@pkoning-laptop.equallogic.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Wed, 26 Mar 2008 03:23:00 -0000 In-Reply-To: <18409.21257.48822.645806@pkoning-laptop.equallogic.com> (Paul Koning's message of "Tue\, 25 Mar 2008 15\:31\:21 -0400") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.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: 2008-03/txt/msg00233.txt.bz2 >>>>> "Paul" == Paul Koning writes: Paul> Something akin to the way that C extension modules inside Python tell Paul> the Python execution machinery what data type it wants might serve. Yeah. Paul> The notion of asking for a particular type is a bit foreign to Python; Paul> arguments have no fixed type. "Type" here was a confusing choice of word. It is really just about having a declarative way to decide how to parse the argument string. Paul> Another possibility is to pass strings but then have standard Paul> conversion routines (things callable by Python and supplied by gdb). Paul> For example parse_and_eval_address. And the target functions. And so Paul> on. One nice property of the declarative approach is that the core code can automatically handle completion as well as parsing. One idea is to let a Python class define a special method which is used to parse the string. If there is no such method, we would look for declarative properties. Tom