From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24133 invoked by alias); 25 Mar 2008 06:28:09 -0000 Received: (qmail 24122 invoked by uid 22791); 25 Mar 2008 06:28:08 -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 06:27:51 +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 m2P6Rl3t013256; Tue, 25 Mar 2008 02:27:47 -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 m2P6RkYY003453; Tue, 25 Mar 2008 02:27:46 -0400 Received: from opsy.redhat.com (vpn-248-108.boston.redhat.com [10.13.248.108]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m2P6RkLt032685; Tue, 25 Mar 2008 02:27:46 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4388837809A; Mon, 24 Mar 2008 23:32:17 -0600 (MDT) To: Thiago Jung Bauermann Cc: 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: Tue, 25 Mar 2008 11:45:00 -0000 In-Reply-To: <1206369478.29533.15.camel@localhost.localdomain> (Thiago Jung Bauermann's message of "Mon\, 24 Mar 2008 11\:37\:58 -0300") 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/msg00215.txt.bz2 >>>>> "Thiago" == Thiago Jung Bauermann writes: Thiago> My turn at the status update. :-) Thanks for sending this. Funnily enough I was just thinking about asking you to write up an example :) 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. My reason is that after playing a bit, I'm not over-fond of the verboseness and extra quoting required by the Python bits. It is more gdb-ish, I think, not to do this. Any opinions? The canonical example is a function to match the calling function at a breakpoint. gdb-ish: break inner if $(caller-is outer) Pythonic: break inner if $(gdb.caller_is ('outer')) BTW other suggestions for fun demos are not only accepted, they are actually helpful. I tend to drive my gdb-python hacking by picking target functionality. My last hack was making it so I could override the (barely useful IMO) 'edit' command to instead emit an annotation that Emacs will pick up :-) Tom