From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9827 invoked by alias); 26 Mar 2008 18:06:56 -0000 Received: (qmail 9818 invoked by uid 22791); 26 Mar 2008 18:06:56 -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; Wed, 26 Mar 2008 18:06:37 +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 m2QI6TC0009874; Wed, 26 Mar 2008 14:06:29 -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 m2QI6S9F003960; Wed, 26 Mar 2008 14:06:28 -0400 Received: from opsy.redhat.com (vpn-248-165.boston.redhat.com [10.13.248.165]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2QI6RTS020069; Wed, 26 Mar 2008 14:06:28 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 1BCC13780C2; Wed, 26 Mar 2008 11:10:32 -0600 (MDT) To: "Doug Evans" Cc: "Thiago Jung Bauermann" , "gdb ml" Subject: Re: repo to work on python scripting support References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Wed, 26 Mar 2008 18:23:00 -0000 In-Reply-To: (Doug Evans's message of "Wed\, 26 Mar 2008 10\:28\:53 -0700") 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/msg00243.txt.bz2 >>>>> "Doug" == Doug Evans writes: >> 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. Doug> OOC, Would there be an intent to not disallow dynamically loaded C/C++ Doug> instead of Python for $(foo)? [Emphasis on OOC.] I think once we've decided to do some extra parsing of $(...), instead of just passing it verbatim to Python for interpretation, we can do whatever we like. I wouldn't be opposed to being able to register new functions implemented in C. >> break inner if $(gdb.caller_is ('outer')) Doug> Parsing two separate languages in one line is problematic too (I'm not Doug> sure how far the Pythonic version was intended to be interpreted). In the current implementation the `...' in $(...) is just passed to Python for evaluation. So, it has to follow Python quoting rules, for instance. This is simple to implement :), but I think yields a not-very-nice user experience. Tom