From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11511 invoked by alias); 10 Feb 2009 09:34:34 -0000 Received: (qmail 11459 invoked by uid 22791); 10 Feb 2009 09:34:34 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout2.012.net.il (HELO mtaout2.012.net.il) (84.95.2.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Feb 2009 09:34:28 +0000 Received: from conversion-daemon.i_mtaout2.012.net.il by i_mtaout2.012.net.il (HyperSendmail v2004.12) id <0KEU00G00FVYLO00@i_mtaout2.012.net.il> for gdb-patches@sourceware.org; Tue, 10 Feb 2009 11:34:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.128.7]) by i_mtaout2.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KEU005I6FY1RIW1@i_mtaout2.012.net.il>; Tue, 10 Feb 2009 11:34:51 +0200 (IST) Date: Tue, 10 Feb 2009 09:34:00 -0000 From: Eli Zaretskii Subject: Re: RFC: add ability to "source" Python code In-reply-to: <20090210034834.GA20077@caradoc.them.org> To: Daniel Jacobowitz Cc: pedro@codesourcery.com, tromey@redhat.com, gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <200902100000.22671.pedro@codesourcery.com> <200902100235.59897.pedro@codesourcery.com> <20090210034834.GA20077@caradoc.them.org> 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: 2009-02/txt/msg00218.txt.bz2 > Date: Mon, 9 Feb 2009 22:48:34 -0500 > From: Daniel Jacobowitz > Cc: Tom Tromey , gdb-patches@sourceware.org > > On Tue, Feb 10, 2009 at 02:35:59AM +0000, Pedro Alves wrote: > > On Tuesday 10 February 2009 01:27:32, Tom Tromey wrote: > > > >>>> "Pedro" == Pedro Alves writes: > > > > > > Pedro> Could you explain for the archives why this is better than having > > > Pedro> the script itself tell GDB that it's running python?  Either > > > Pedro> through something similar to a shebang, or starting the script with > > > Pedro> "python" (does that work?) ?  I think you've discussed this before, > > > Pedro> what were the limitations you found? > > > > > > I think you may be thinking of invoking a python script using > > > "#!.../gdb -something".  This patch does not cover that case.  That is > > > a separate patch, which I haven't submitted. > > I had something like "# *-python-*" in mind... :-) Yes. I think this is by far the best solution, one that will keep back compatibility without hampering any of the new and valuable Python features. Can we agree on using such cookies in GDB scripts written in Python? Then we won't need the -p switch or the .py extension detection.