From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16726 invoked by alias); 10 Feb 2009 11:58:24 -0000 Received: (qmail 16712 invoked by uid 22791); 10 Feb 2009 11:58:24 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e24smtp02.br.ibm.com (HELO e24smtp02.br.ibm.com) (32.104.18.86) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Feb 2009 11:58:17 +0000 Received: from d24relay01.br.ibm.com (d24relay01.br.ibm.com [9.8.31.16]) by e24smtp02.br.ibm.com (8.13.1/8.13.1) with ESMTP id n1AC6Ktu007191 for ; Tue, 10 Feb 2009 10:06:20 -0200 Received: from d24av01.br.ibm.com (d24av01.br.ibm.com [9.18.232.46]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n1ACveHB2425012 for ; Tue, 10 Feb 2009 09:57:40 -0300 Received: from d24av01.br.ibm.com (loopback [127.0.0.1]) by d24av01.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n1ABwDL5030205 for ; Tue, 10 Feb 2009 09:58:13 -0200 Received: from [9.18.198.243] ([9.18.198.243]) by d24av01.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n1ABwCbm030194; Tue, 10 Feb 2009 09:58:13 -0200 Subject: Re: RFC: add ability to "source" Python code From: Thiago Jung Bauermann To: Eli Zaretskii Cc: Daniel Jacobowitz , pedro@codesourcery.com, tromey@redhat.com, gdb-patches@sourceware.org In-Reply-To: References: <200902100000.22671.pedro@codesourcery.com> <200902100235.59897.pedro@codesourcery.com> <20090210034834.GA20077@caradoc.them.org> Content-Type: text/plain; charset=utf-8 Date: Tue, 10 Feb 2009 11:58:00 -0000 Message-Id: <1234267091.13871.4.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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/msg00219.txt.bz2 El mar, 10-02-2009 a las 11:34 +0200, Eli Zaretskii escribió: > > Date: Mon, 9 Feb 2009 22:48:34 -0500 > > From: Daniel Jacobowitz > > Cc: Tom Tromey , gdb-patches@sourceware.org > > > > 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. I don't mind GDB detecting that string in the beginning of a Python script. But I am strongly against dropping filename extension detection in favour of that. I've never written a Python script (in GDB or otherwise) with that markup, but *all* the Python scripts I ever wrote in my life ended in .py. It'd be just counter-intuitive and counter productive to not support the filename extension. -- []'s Thiago Jung Bauermann IBM Linux Technology Center