From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8076 invoked by alias); 26 Mar 2008 18:05:18 -0000 Received: (qmail 8064 invoked by uid 22791); 26 Mar 2008 18:05:18 -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; Wed, 26 Mar 2008 18:04:58 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id CAEA1983A1; Wed, 26 Mar 2008 18:04:56 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 905F298140; Wed, 26 Mar 2008 18:04:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JeZzb-0005vO-CZ; Wed, 26 Mar 2008 14:04:55 -0400 Date: Wed, 26 Mar 2008 18:13:00 -0000 From: Daniel Jacobowitz To: Doug Evans Cc: Tom Tromey , Thiago Jung Bauermann , gdb ml Subject: Re: repo to work on python scripting support Message-ID: <20080326180455.GA22644@caradoc.them.org> Mail-Followup-To: Doug Evans , Tom Tromey , Thiago Jung Bauermann , gdb ml References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2008-03/txt/msg00242.txt.bz2 On Wed, Mar 26, 2008 at 10:28:53AM -0700, Doug Evans wrote: > On Mon, Mar 24, 2008 at 10:32 PM, Tom Tromey wrote: > > I've been thinking... maybe we do want $(...) to allow things other > > than Python commands. Or, more precisely, maybe we want to let Python > > code register a function by name for use in $(...). The Python > > function would get the uninterpreted string argument for processing. > > OOC, Would there be an intent to not disallow dynamically loaded C/C++ > instead of Python for $(foo)? [Emphasis on OOC.] My plan on this, to date, has been to insist on use of the Python interface for marshalling and unmarshalling. This keeps the interface explicit. Of course, Python can load C modules itself and there'd be nothing to stop that if you needed to do e.g. some more intensive computation in the C side; and with a little forethought we could probably keep likely bulky operations (like memory reading) as zero-copy. > Parsing two separate languages in one line is problematic too (I'm not > sure how far the Pythonic version was intended to be interpreted). Yes, I think we'll not want to allow raw Python in most GDB expressions; if it's useful in a convenience expression the outer layer of quoting should probably belong to GDB. print $(py "this is a python \"program\"") -- Daniel Jacobowitz CodeSourcery